Added authorization server and backup of JSReport config. IO-585
This commit is contained in:
14
jsreport/server.js
Normal file
14
jsreport/server.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const jsreport = require('jsreport')()
|
||||
|
||||
if (process.env.JSREPORT_CLI) {
|
||||
// export jsreport instance to make it possible to use jsreport-cli
|
||||
module.exports = jsreport
|
||||
} else {
|
||||
jsreport.init().then(() => {
|
||||
// running
|
||||
}).catch((e) => {
|
||||
// error during startup
|
||||
console.error(e.stack)
|
||||
process.exit(1)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user