Skip to content

Instantly share code, notes, and snippets.

@weavejester
Created February 13, 2019 13:15
Show Gist options
  • Save weavejester/4b49c6ff24e960b4e41053088d9fc180 to your computer and use it in GitHub Desktop.
Save weavejester/4b49c6ff24e960b4e41053088d9fc180 to your computer and use it in GitHub Desktop.
{:duct.profile/base
{:duct.core/project-ns film-ratings
:duct.router/ataraxy
{:routes
{[:get "/"] [:film-ratings.handler/index]
"/add-film"
{:get [:film-ratings.handler.film/show-create]
[:post {film-form :form-params}] [:film-ratings.handler.film/create film-form]}
[:get "/list-films"] [:film-ratings.handler.film/list]}}
:film-ratings.handler/index {}
:film-ratings.handler.film/show-create {}
:film-ratings.handler.film/create {:db #ig/ref :duct.database/sql}
:film-ratings.handler.film/list {:db #ig/ref :duct.database/sql}
:duct.migrator/ragtime
{:migrations [#ig/ref :film-ratings.migrations/create-film]}
[:duct.migrator.ragtime/sql :film-ratings.migrations/create-film]
{:up ["CREATE TABLE film (id INTEGER PRIMARY KEY, name TEXT UNIQUE, description TEXT, rating INTEGER)"]
:down ["DROP TABLE film"]}}
:duct.profile/dev #duct/include "dev"
:duct.profile/local #duct/include "local"
:duct.profile/prod {}
:duct.module/logging {}
:duct.module.web/site {}
:duct.module/sql {}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment