/[sudobot]/trunk/ecosystem.config.js
ViewVC logotype

Annotation of /trunk/ecosystem.config.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 572 - (hide annotations)
Mon Jul 29 17:51:37 2024 UTC (8 months ago) by rakinar2
File MIME type: text/javascript
File size: 661 byte(s)
chore: push code for v9
1 rakinar2 572 const { existsSync } = require("fs");
2     const { resolve } = require("path");
3    
4     const logDirectoryExists = existsSync(resolve(__dirname, "logs"));
5    
6     /**
7     * @type {import("@onesoftnet/pm2-config").PM2Config}
8     */
9     const config = {
10 rakin 259 apps: [
11     {
12 rakinar2 572 name: "sudobot",
13     script: "build/out/main.js",
14 rakin 259 env_production: {
15     NODE_ENV: "production"
16     },
17 rakinar2 572 autorestart: true,
18     log_date_format: "YYYY-MM-DD HH:mm:ss Z",
19     log_file: logDirectoryExists ? "logs/debug.log" : null,
20     error: logDirectoryExists ? "logs/error.log" : null
21 rakin 259 }
22 rakinar2 572 ]
23 rakin 259 };
24 rakinar2 572
25     module.exports = config;

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26