summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-03-14 01:06:28 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2017-03-14 01:06:28 +0100
commitd84b462a711ce95593ff05a7581e722562c3835a (patch)
tree41e5af455fea925b2680b29718b24ba2876e803a /config
downloadbar-d84b462a711ce95593ff05a7581e722562c3835a.tar
bar-d84b462a711ce95593ff05a7581e722562c3835a.tar.gz
bar-d84b462a711ce95593ff05a7581e722562c3835a.tar.bz2
bar-d84b462a711ce95593ff05a7581e722562c3835a.tar.xz
bar-d84b462a711ce95593ff05a7581e722562c3835a.zip
Implement old bar.hs
Diffstat (limited to 'config')
-rw-r--r--config/models12
-rw-r--r--config/routes7
-rw-r--r--config/settings.yml26
3 files changed, 45 insertions, 0 deletions
diff --git a/config/models b/config/models
new file mode 100644
index 0000000..aa335df
--- /dev/null
+++ b/config/models
@@ -0,0 +1,12 @@
1Item
2 kind Text
3 normKind Text
4 bought Day Maybe
5 expires Day Maybe
6 opened Day Maybe
7 deriving Show Eq
8Reference
9 normKind Text
10 kind Text
11 UniqueKind normKind
12 deriving Show Eq Ord \ No newline at end of file
diff --git a/config/routes b/config/routes
new file mode 100644
index 0000000..54d6593
--- /dev/null
+++ b/config/routes
@@ -0,0 +1,7 @@
1/static StaticR EmbeddedStatic appStatic
2
3/ InventoryListingR GET POST PUT
4/inv/#ItemId/edit UpdateItemR GET POST
5/inv/#ItemId/open OpenItemR POST
6/inv/#ItemId/delete DeleteItemR POST
7/inv/#ItemId ItemR GET PUT PATCH DELETE
diff --git a/config/settings.yml b/config/settings.yml
new file mode 100644
index 0000000..fcae60c
--- /dev/null
+++ b/config/settings.yml
@@ -0,0 +1,26 @@
1# Values formatted like "_env:ENV_VAR_NAME:default_value" can be overridden by the specified environment variable.
2# See https://github.com/yesodweb/yesod/wiki/Configuration#overriding-configuration-values-with-environment-variables
3
4static-dir: "_env:STATIC_DIR:static"
5host: "_env:HOST:*4" # any IPv4 host
6port: "_env:PORT:3000" # NB: The port `yesod devel` uses is distinct from this value. Set the `yesod devel` port from the command line.
7ip-from-header: "_env:IP_FROM_HEADER:false"
8
9# Default behavior: determine the application root from the request headers.
10# Uncomment to set an explicit approot
11approot: "_env:APPROOT:"
12
13# Optional values with the following production defaults.
14# In development, they default to the inverse.
15#
16# detailed-logging: false
17# should-log-all: false
18# reload-templates: false
19
20database:
21 user: "_env:PGUSER:bar"
22 password: "_env:PGPASS:"
23 host: "_env:PGHOST:"
24 port: "_env:PGPORT:"
25 database: "_env:PGDATABASE:bar"
26 poolsize: "_env:PGPOOLSIZE:10"