Added authorization server and backup of JSReport config. IO-585

This commit is contained in:
Patrick Fic
2021-01-07 10:10:55 -08:00
parent bf507821c0
commit 3da3fb96e2
36 changed files with 20037 additions and 0 deletions

14
jsreport/server.js Normal file
View 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)
})
}