This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-06
Channels
- # admin-announcements (6)
- # beginners (147)
- # boot (9)
- # braveandtrue (5)
- # cider (11)
- # cljsjs (1)
- # cljsrn (4)
- # clojure (82)
- # clojure-greece (9)
- # clojure-poland (9)
- # clojure-russia (288)
- # clojure-taiwan (2)
- # clojure-uk (73)
- # clojurescript (123)
- # consulting (3)
- # cursive (26)
- # datascript (4)
- # datomic (32)
- # dirac (56)
- # emacs (11)
- # flambo (2)
- # hoplon (425)
- # jobs-rus (1)
- # lein-figwheel (3)
- # leiningen (16)
- # luminus (42)
- # mount (7)
- # om (1)
- # om-next (2)
- # onyx (8)
- # other-languages (146)
- # quil (3)
- # re-frame (17)
- # reagent (6)
- # spacemacs (2)
- # uncomplicate (8)
- # untangled (71)
- # vim (2)
- # yada (49)
i’ve got to be doing something wrong here: when I try to print out the form params of a POST request, it yields ‘nil’.
I deployed a luminus app to Heroku today, and when loading you see a flash of the lein-figwheel
prompt. Any idea how to avoid that?
If I have a lot of configuration variables that I don’t want to have to set/export in production, whats the best place to put them so they get ‘included’ in my uberjar? Profiles.clj doesn’t seem to work out of the box for :profiles/prod with uberjar.
@juliobarros: are these things like db, redis,... username/endpoints?
@richiardiandrea: yeah, and a ton of access keys to external apis.
usually in prod these are environment variables that you launch script sets, so you should not persist them anywhere
yeah, I don’t want to set all those env vars.
I think that's how Luminus assumes you should do it, a simple bash script:
export DB_USER= ...
...
...
java -cp my-app-standalone.jar my-app.core
Thats not how I want to start up the jar file. I’d like all the config info already baked in.
and to manage the keys in an edn data structure.
so basically you want to have a read at how cprop
handles the merging of configs
{:service1 {:key “” :token “”}}
there is the possibility to read from a system property
I can put them in env/prod/resources/config.edn … but I had already been using profiles for dev and test so was not sure what the best and minimal change would be.
no but that file is then persisted to git
you don't want that right?
right. I can unpersist it though
yes that's true 😉
with this conf
system property basically you launch your jar with java -Dconf=...path.... ....
and store this file on the server, potentially persisted to another "encrypted" repo with all the config files
Really want a self contained jar without having to set env vars … so that I can say “ALL you have to do is run the jar.” no env vars, no files outside of the jar.
maybe there is a way with lein
, but in boot
you could basically do it at build time
I include a version file every time and this file might or not be persisted to git
ok. Thanks. Wanted to check there was not an easy approach I was missing.
probably an "unpersisted" file in resources
would do
and then change my config.clj to have cprops read that file?
cprop
can read from anywhere, just add the right key: https://github.com/tolitius/cprop#loading-from-the-source
Ok. Thanks.
when I send a request with form parameters, the request is nil
like, when I do (println (str “request ->” request)), it’s empty
it just shows “request ->"
is there a log level I can increase to output verbose messages to see what the request looks like coming in?
nvm, fixed the problem
I noticed that when I receive a request, all the numbers come in as strings
so, when I use bouncer to validate, it always fails on number validation
they fail*