-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_tables.js
executable file
·54 lines (47 loc) · 1.12 KB
/
create_tables.js
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
const dotenv = require('dotenv');
const sails = require('sails');
dotenv.load();
// disable discord bot
process.env.DISCORDBOTTOKEN = '';
process.env.NODE_ENV = 'development';
const configOverrides = Object.assign({}, require('./config/env/production.js'), {
hookTimeout: 60000,
hooks: {
/* This should get shared somewhere */
views: false,
sockets: false,
pubsub: false,
grunt: false,
http: false,
blueprints: false,
router: false,
cron: false,
banneditems: false,
customdiscordnotification: false,
customhooks: false,
discordbot: false,
discordchatbridge: false,
discordnotifications: false,
economy: false,
historicalinfo: false,
playertracking: false,
sdtdcommands: false,
sdtdlogs: false,
bullboard: false,
countryban: false,
},
models: {
// always do migrations!
migrate: 'alter',
},
security: {
csrf: false
},
});
sails.on('hook:orm:loaded', async () => {
console.log('done creating tables');
process.exit(0);
});
sails.load(configOverrides, function (err) {
if (err) { console.error(err); process.exit(1); }
});