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

35 lines
1.1 KiB

module.exports = {
apps: [
{
// 应用的名称
name: 'qry-python-js',
// Express 应用的入口文件
script: './app.js',
// 启动的实例数('max' 表示使用所有可用的 CPU 核心)
instances: 'max',
// 使用集群模式
exec_mode: 'cluster',
watch: true,
ignore_watch: ['node_modules', 'back', 'docs', '.git', 'public', 'test', 'dict'],
log_date_format: 'YYYY-MM-DD HH:mm:ss',
// exec_command: "node12 app.js",
exec_interpreter: "/root/.nvm/versions/node/v20.12.2/bin/node",
env: {
// 开发环境的环境变量
NODE_ENV: 'development',
PORT: 9081
},
env_uat: {
// 开发环境的环境变量
NODE_ENV: 'uat',
PORT: 58081
},
env_prod: {
// 生产环境的环境变量
NODE_ENV: 'prod',
// 自定义环境变量示例
PORT: 58081,
},
},
],
};