forked from reactivepixel/Max-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
34 lines (32 loc) · 884 Bytes
/
gulpfile.js
File metadata and controls
34 lines (32 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const gulp = require('gulp');
const fs = require('fs');
gulp.task('db', () => {
require('dotenv').config();
const config = {
development: {
username: 'root',
password: process.env.MYSQL_ROOT_PASSWORD,
database: process.env.MYSQL_DATABASE,
host: process.env.MYSQL_HOST,
dialect: 'mysql',
},
};
fs.writeFileSync('./db/config/config.json', JSON.stringify(config));
});
gulp.task('pm2', () => {
require('dotenv').config();
const config = {
apps: [{
name: 'max',
script: './bot/client.js',
env: {
TOKEN: process.env.DISCORD_BOT_TOKEN,
DEBUG_MODE: '3',
EMAIL_USERNAME: process.env.EMAIL_USERNAME,
EMAIL_PASS: process.env.EMAIL_PASS,
NODE_ENV: process.env.NODE_ENV,
},
}],
};
fs.writeFileSync('./max.config.js', 'module.exports = ' + JSON.stringify(config));
});