You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
998 B
JavaScript

10 months ago
const fs = require('fs');
var date = new Date();
// var dat= date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear();
var dat= `${date.getFullYear()}-${(date.getMonth()+1)}-${date.getDate()}`;
var err_log = "./pm2/logs/err.log";
var out_log = "./pm2/logs/out.log";
fs.mkdirSync(`./pm2/logs/${dat}`, { recursive: true });
err_log = './pm2/logs/' + dat + '/error.log';
out_log = './pm2/logs/' + dat + '/output.log';
combined_log = './pm2/logs/' + dat + '/combined.log';
module.exports = {
apps: [
{
name: 'hotelhub',
script: 'bin/www',
max_memory_restart: "500M",
merge_logs: true,
max_restarts: 20,
error_file: err_log,
out_file: out_log,
// instances: 1,
watch: false
}
]
}
// export const apps = [{
// name: 'hotelhub',
// script: 'bin/www',
// max_memory_restart: "500M",
// merge_logs: true,
// max_restarts: 20,
// error_file: err_log,
// out_file: out_log,
// // instances: 1,
// watch: '.'
// }];