Skip to content
run your own self destructing note service
Clojure Shell TSQL
Branch: master
Clone or download
Latest commit 1f52fb4 Jun 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci deploy enhancements: (#7) Apr 12, 2019
resources/migrations
src/self_destruct quick css fix Jun 17, 2019
test/self_destruct initial project scaffolding update/setup Jan 10, 2019
.gitignore initial project scaffolding update/setup Jan 10, 2019
LICENSE Initial commit Jan 10, 2019
Procfile
README.org minor cleanup Apr 15, 2019
design.org initial db setup Jan 14, 2019
profiles_example.clj deploy enhancements: (#7) Apr 12, 2019
project.clj

README.org

self-destruct

run your own self destructing note service

Prerequisites

You will need Leiningen 2.0.0 or above installed.

Development Mode

Set Environment Variables & Secrets

Copy the example file, and update the values.

cp profiles_example.clj profiles.clj

Setup Local Development Database

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

One alias to rule them all

This alias should do all that is necessary in one step for local development.

lein dev

Running the local development web server

To start a web server for local live development of the application, run:

lein ring server

Automatically Recompile CSS File on Changes

lein garden auto

Database Migrations

  • 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 the up and down files created.
  • migrations are applied automatically see config.clj and core.clj
  • to manually apply migrations to your local dev instance lein migratus migrate

Production Setup

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”)

License

Copyright © Chad Stovern.

You can’t perform that action at this time.