How to run jsreport in production mode
-
By default, jsreport runs in development mode. How can i run it in production mode
-
hi! are you running jsreport from node.js?
just set the
NODE_ENV
env var toproduction
.example in windows:
set NODE_ENV=production node server.js
osx/linux
NODE_ENV=production node server.js
-
thank you
-
how can i set prod config as default config rather than setting up env variable
-
This is not possible, jsreport loads the config based on the env variable.
However we want to improve this topic very soon, you can join here and add your cents.
https://github.com/jsreport/jsreport/issues/295
-
Forgot to mention you can use your own config file like this when changing
server.js
var jsreport = require('jsreport')(fs.readFileSync('myconfig.json')) jsreport.init()