Skip to content

Commit

Permalink
update server.js
Browse files Browse the repository at this point in the history
  • Loading branch information
bjrmatos committed Mar 12, 2018
1 parent 2d7d6d2 commit 296cdbe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions example.server.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
var jsreport = require('jsreport')()
const jsreport = require('jsreport')()

if (process.env.JSREPORT_CLI) {
module.exports = jsreport
} else {
jsreport.init().then(function () {
jsreport.init().then(() => {
// running
}).catch(function (e) {
}).catch((e) => {
// error during startup
console.error(e.stack)
process.exit(1)
Expand Down
6 changes: 3 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
var jsreport = require('./')({rootDirectory: __dirname})
const jsreport = require('./')({rootDirectory: __dirname})

if (process.env.JSREPORT_CLI) {
module.exports = jsreport
} else {
jsreport.init().then(function () {
}).catch(function (e) {
jsreport.init().then(() => {
}).catch((e) => {
console.trace(e)
process.exit(1)
})
Expand Down

0 comments on commit 296cdbe

Please sign in to comment.