Is it possible to use multiple config files?

  • Is it possible to use multiple config files ?


    • jsreport.config.json -> default configuration

    And then one of the following on top of the default config

    • dev.config.json
    • tst.config.json
    • stg.config.json
    • prod.config.json

    It seems that I can only provide one configFile by argument, and when using the jsreport.config.json file is not used.

  • You would like to merge multiple config files?
    No, this isn't possible.

    However, this is very easy to code on your side.
    You can update server.js with something like this:

    const fs = require('fs')
    const jsreport = require('jsreport')({
    if (process.env.JSREPORT_CLI) {
      module.exports = jsreport
    } else {
      jsreport.init().then(async () => {
      }).catch((e) => {

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.