-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.mjs
More file actions
30 lines (23 loc) · 867 Bytes
/
start.mjs
File metadata and controls
30 lines (23 loc) · 867 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
// SERVER IMPORTS
import { Settings } from '#modules/settings/main.mjs';
// DotEnv to read .env file
import dotenv from 'dotenv';
dotenv.config();
import { info, warning } from '@gamunetwork/logger';
// Logger to log the server activity
import LoggerConfig from '#modules/logger/main.mjs';
new LoggerConfig();
// Discord Bot to handle some archiving and further features
import DiscordClient from './discordbot/main.mjs';
if(process.env.DISCORD_TOKEN != undefined) {
const discordBot = new DiscordClient();
discordBot.login(process.env.DISCORD_TOKEN);
info("Discord bot started");
}
else{
warning("No Discord token provided, Artifacts will not be archived.");
}
// ServerWebApp to handle the web server
import ServerWebApp from '#modules/webserverapp/main.mjs';
const server = new ServerWebApp();
server.listen();