run your own self destructing note service
You will need Leiningen 2.0.0 or above installed.
Copy the example file, and update the values.
cp profiles_example.clj profiles.clj
self-destruct uses postgresql; you’ll need this availalbe for local dev. to create a local dev database run the following commands.
createdb self-destruct-dev
lein migratus migrate
This alias should do all that is necessary in one step for local development.
lein dev
To start a web server for local live development of the application, run:
lein ring server
lein garden auto
- the clojure migratus library is used to handle db schema changes.
- migrations are located in the
resources/migrations
folder. - to create a new migration
lein migratus create <descriptive-name>
and then edit theup
anddown
files created. - migrations are applied automatically see config.clj and core.clj
- to manually apply migrations to your local dev instance
lein migratus migrate
you’ll need to load the following environment variables in your production environment:
DATABASE_URL
PORT
SESSION_COOKIE_KEY
optionally you can customize the following variables in your production environment:
REPORTED_LOG_LEVEL
(defaults to “warn”; set’s min level to write to production log)LOG_APPENDER
(options “println” “sentry”)SENTRY_DSN
(required only if you’ve set log-appender to “sentry”)
Copyright © Chad Stovern.