summaryrefslogtreecommitdiffstats
path: root/src/helpers.cr
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-03-09 12:42:23 -0600
committerOmar Roth <omarroth@hotmail.com>2018-03-09 12:42:23 -0600
commiteb1d1e30d1cdcaceb64e6bbba56c64a41269147e (patch)
tree58052f8ba6bebfbb5820c5ba413420052a8b80c5 /src/helpers.cr
parente22d6d8549ee95c755b3f6a6fdee52cb0053252e (diff)
downloadinvidious-eb1d1e30d1cdcaceb64e6bbba56c64a41269147e.tar.gz
invidious-eb1d1e30d1cdcaceb64e6bbba56c64a41269147e.tar.bz2
invidious-eb1d1e30d1cdcaceb64e6bbba56c64a41269147e.zip
Add config file
Diffstat (limited to 'src/helpers.cr')
-rw-r--r--src/helpers.cr14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/helpers.cr b/src/helpers.cr
index 5b3d6625..7ca5bd61 100644
--- a/src/helpers.cr
+++ b/src/helpers.cr
@@ -13,6 +13,20 @@ macro templated(filename)
render "src/views/#{{{filename}}}.ecr", "src/views/layout.ecr"
end
+class Config
+ YAML.mapping({
+ pool_size: Int32,
+ threads: Int32,
+ db: NamedTuple(
+ user: String,
+ password: String,
+ host: String,
+ port: Int32,
+ dbname: String,
+ ),
+ })
+end
+
class Video
module HTTPParamConverter
def self.from_rs(rs)