UNPKG

react-admin-lb4

Version:
25 lines (21 loc) 601 B
const application = require('./dist'); const fs = require('fs'); fs.writeFileSync(__dirname + '/../data/db.json', '{}'); module.exports = application; if (require.main === module) { // Run the application const config = { rest: { port: +process.env.PORT || 3000, host: process.env.HOST || 'localhost', openApiSpec: { // useful when used with OASGraph to locate your application setServersFromRequest: true, }, }, }; application.main(config).catch(err => { console.error('Cannot start the application.', err); process.exit(1); }); }