From d84b462a711ce95593ff05a7581e722562c3835a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 14 Mar 2017 01:06:28 +0100 Subject: Implement old bar.hs --- config/models | 12 ++++++++++++ config/routes | 7 +++++++ config/settings.yml | 26 ++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 config/models create mode 100644 config/routes create mode 100644 config/settings.yml (limited to 'config') diff --git a/config/models b/config/models new file mode 100644 index 0000000..aa335df --- /dev/null +++ b/config/models @@ -0,0 +1,12 @@ +Item + kind Text + normKind Text + bought Day Maybe + expires Day Maybe + opened Day Maybe + deriving Show Eq +Reference + normKind Text + kind Text + UniqueKind normKind + 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 @@ +/static StaticR EmbeddedStatic appStatic + +/ InventoryListingR GET POST PUT +/inv/#ItemId/edit UpdateItemR GET POST +/inv/#ItemId/open OpenItemR POST +/inv/#ItemId/delete DeleteItemR POST +/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 @@ +# Values formatted like "_env:ENV_VAR_NAME:default_value" can be overridden by the specified environment variable. +# See https://github.com/yesodweb/yesod/wiki/Configuration#overriding-configuration-values-with-environment-variables + +static-dir: "_env:STATIC_DIR:static" +host: "_env:HOST:*4" # any IPv4 host +port: "_env:PORT:3000" # NB: The port `yesod devel` uses is distinct from this value. Set the `yesod devel` port from the command line. +ip-from-header: "_env:IP_FROM_HEADER:false" + +# Default behavior: determine the application root from the request headers. +# Uncomment to set an explicit approot +approot: "_env:APPROOT:" + +# Optional values with the following production defaults. +# In development, they default to the inverse. +# +# detailed-logging: false +# should-log-all: false +# reload-templates: false + +database: + user: "_env:PGUSER:bar" + password: "_env:PGPASS:" + host: "_env:PGHOST:" + port: "_env:PGPORT:" + database: "_env:PGDATABASE:bar" + poolsize: "_env:PGPOOLSIZE:10" -- cgit v1.2.3