lein-marathon
enables it to convert the config file(config.edn) of Luminus-framework to Marathon-framework style one (JSON mode).
Add lein-marathon to your plugin list in your project.clj:
:plugins [[lein-marathon "0.1.0"]
Available commands:
$ lein marathon # default dev
$ lein marathon dev
$ lein marathon prod
If you make an app with Luminus web framework, a config file is generated at a specific directory.
For example, in you project.clj, you may find a profile information added as below:
:profiles
{:uberjar {:omit-source true
:aot :all
:uberjar-name "testminsun.jar"
:source-paths ["env/prod/clj"]
:resource-paths ["env/prod/resources"]}
:project/dev {...
:source-paths ["env/dev/clj"]
:resource-paths ["env/dev/resources"]
...}
dev
is fromresource-paths
of:project/dev
.prod
is fromresource-paths
of:uberjar
.
You just may change your config path in the project.clj.
It generated to .marathon_config_dev
or .marathon_config_prod
.
from env/prod/resources/config.edn
{:production true
:port 3000}
to .marathon_config_prod
{"PRODUCTION":true,"PORT":3000}
You can just copy & paste to your marathon framework configuration on JSON mode.
-
This version only works on Luminus framework. So your project must be written in Luminus style. A framework-independent version would be updated soon.
-
Any feature you want is welcome!
- Plz Report on issues.
-
PR is also welcome 🤗
If you want to create environment variables file(eg. ENV_VAR1=1 ...) for Docker containers. Recommend orend's lein-var-file.
Copyright © 2017 Minsun Lee
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.