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.cljself-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 migrateThis alias should do all that is necessary in one step for local development.
lein devTo start a web server for local live development of the application, run:
lein ring serverlein garden auto- the clojure migratus library is used to handle db schema changes.
- migrations are located in the
resources/migrationsfolder. - to create a new migration
lein migratus create <descriptive-name>and then edit theupanddownfiles 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_URLPORTSESSION_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.