An exploration of web development in Clojure.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

listopia CircleCI

an exploration of web development in Clojure.


register, login, and make lists!

local dev setup

listopia uses postgresql; you'll need this availalbe for local dev. to create a local dev database run the following command.

createdb listopia-dev

create a profiles.clj in the project root (which is ignored by git) to define your local dev database connection. an example would look like this:

  {:database-url "jdbc:postgresql://localhost/listopia-dev"
   :reported-log-level "debug"
   :session-cookie-key "changecookiekey1"}}
  {:database-url "jdbc:postgresql://localhost/listopia-test"
   :reported-log-level "debug"
   :session-cookie-key "changecookiekey2"}}}

to run locally (after migrations have been run, see below) use lein run this will start on port 8000 by default, but accepts a port number as an argument as well. to run interactively for local development run lein ring server to continually apply code changes as you develop.

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.
  • to apply migrations to your local dev instance lein migratus migrate
  • production migrations are applied automatically; see circle.yml

production setup

you'll need to load the following environment variables in your production environment:

  • PORT

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

Distributed under the BSD 3-Clause License