Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
else {
jwtSecret = 'mrnodebot';
logger.warn('You did not set a jwt api secret in express.jwt.secret, falling back to default');
}
return jwtSecret;
};
// Create Express Server
const webServer = Express();
// Initialize Helmet
webServer.use(helmet());
// Initiate express-vue
const finalVueOptions = _.isObject(app.Config.vueOptions) ? _.defaults(expressVueOptions, app.Config.vueOptions) : expressVueOptions;
const expressVueMiddleware = expressVue.init(finalVueOptions);
webServer.use(expressVueMiddleware);
// Hold on to HTTP Server
const server = require('http').createServer(webServer);
// Bind Socket.io
webServer.socketIO = socketIO(server);
// Hold on to the Logging transports
const transports = [];
// Push the File Logging transports
transports.push(
new (winston.transports.DailyRotateFile)({
name: 'express-info-file',
filename: 'logs/express-info.log',