Skip to content

the-frey/compojure-api-integrant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

compojure-api-integrant

Some defaults to get up-and-running with Compojure API and Integrant in dev as quickly as possible.

Usage

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.

Run in development

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.

Production

Some more work needs to happen to make this reusable for production. I'll look at this ASAP.

Heroku

Can be easily deployed to Heroku with these steps:

FIXME

Run the application locally

lein ring server

Packaging and running as standalone jar

lein do clean, ring uberjar
java -jar target/server.jar

Packaging as war

lein ring uberwar

License

Copyright © FIXME

About

Defaults for dev work using Compojure API and Integrant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published