I am using jsreport in nodejs app but when i running by command node server.js, it run like none confiuration file. Why it is showing none configuration file?
...js
2018-11-03T02:34:50.320Z - info: Initializing jsreport@2.2.0 in development mode using configuration file: none
....
server.js code
const express = require('express');
const reportingApp = express();
const app = express();
var bodyParser = require('body-parser');
const jsonParser =bodyParser.json({limit:'10mb'});
const urlEncoded = bodyParser.urlencoded({limit:'10mb',extended:true});
const appPort = require('config').get('APP').apphost;
app.get('/', (req, res) => {
res.send('Hello from the main application');
});
app.use('/reporting', reportingApp);
// parse various different custom JSON types as JSON
app.use(bodyParser.json({ type: 'application/*+json' }));
// parse some custom thing into a Buffer
app.use(bodyParser.raw({ type: 'application/vnd.custom-type' }));
// parse an HTML body into a string
app.use(bodyParser.text({ type: 'text/html' }));
// parse an HTML body into a string
app.use(bodyParser.text({ type: 'application/octet-stream' }));
app.use( jsonParser);
app.use(urlEncoded );
app.set('my_port', process.env.PORT || process.argv[2] || appPort);
app.disable("x-powered-by");
const server = app.listen(app.get('my_port'));
const jsreport = require('jsreport')({
extensions: {
express: { app: reportingApp, server: server },
},
appPath: "/reporting"
});
jsreport.init().then(() => {
console.log('Running JS Report Server!!');
}).catch((e) => {
console.error(e.stack);
});