Some defaults to get up-and-running with Compojure API and Integrant in dev as quickly as possible.
I'll probably package this as a template at some point. For now, grab the code, check the deps are up-to date and then git init
a fresh repo for your API project.
env MONGO_URL='mongodb://127.0.0.1/dev' lein repl
user=> (go)
... some logging...
:initiated
Then you can def things like mongo via the system map, which can be used to call methods that require a connection:
user=> (def mongodb (:adapter/mongo integrant.repl.state/system))
;; => '#mongodb
Hit the configured port in config.edn
in your browser and the app should be running.
Some more work needs to happen to make this reusable for production. I'll look at this ASAP.
Can be easily deployed to Heroku with these steps:
FIXME
lein ring server
lein do clean, ring uberjar
java -jar target/server.jar
lein ring uberwar
Copyright © FIXME