untangled 2016-12-30

um. I deployed something to heroku

but not with a Datomic back-end

oh...I think it was an in-memory datomic instance

the main thing was setting PORT via the environment, which untangled-server supports if you put a special marker in the config file

something like: { :server { :port :env/PORT }}

cool... I have been steadily getting there, but that will help

I don't remember the exact syntax, but you can try it out locally with PORT=9000 java -jar app.jar and see

you'll need to embed the config file in your app resources (so it ends up in the jar)

and there is a command line option for setting the config file in untangled server...`-configFile` or something

a relative path to the file will go against classpath

so use jar tf app.jar to see where the file is, and just use that relative path

@fragamus java -Dconfig=config/production.edn -jar app.jar (assuming you have config/production.edn in the jar file)

and {:server {:port :env.edn/PORT}} as the content

the :env/PORT will return it as a string. The EDN version reads the string using read-string, so you can embed true clj data in an env variable

Feel free to write up a devcard appendix for the devguide "Deploying to Heroku" 😉