2021-09-14 09:56:11 -07:00
|
|
|
import Environment from './Environment';
|
2022-06-06 14:59:53 +07:00
|
|
|
import Configuration from './Configuration';
|
2021-09-14 09:56:11 -07:00
|
|
|
import Prisma from './Prisma';
|
|
|
|
|
import Discord from './Discord';
|
2021-09-19 08:40:09 -07:00
|
|
|
import osu from './osuAPI';
|
2022-08-26 06:36:45 +07:00
|
|
|
import Express from './Express';
|
2021-09-14 09:56:11 -07:00
|
|
|
|
2022-06-06 14:59:53 +07:00
|
|
|
import Logger from '../libs/Logger';
|
2022-06-06 20:11:54 +07:00
|
|
|
import Locale from './Locale';
|
2021-09-14 09:56:11 -07:00
|
|
|
class App {
|
2022-07-12 12:40:06 +07:00
|
|
|
public readonly versionNumber = `0.11`;
|
2022-06-06 14:59:53 +07:00
|
|
|
public readonly version = `${this.versionNumber}${
|
|
|
|
|
Environment.get().NODE_ENV === 'development' ? ' / Development Build' : ''
|
|
|
|
|
}`;
|
2021-09-14 09:56:11 -07:00
|
|
|
|
2022-01-27 18:00:47 +07:00
|
|
|
public loadConfig(): void {
|
|
|
|
|
Logger.log('info', 'Loading configuration');
|
|
|
|
|
Configuration.init();
|
|
|
|
|
}
|
|
|
|
|
|
2021-09-14 09:56:11 -07:00
|
|
|
public loadENV(): void {
|
|
|
|
|
Logger.log('info', 'Loading environment');
|
|
|
|
|
Environment.init();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public loadPrisma(): void {
|
|
|
|
|
Logger.log('info', 'Loading Prisma');
|
|
|
|
|
Prisma.init();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public loadDiscord(): void {
|
|
|
|
|
Logger.log('info', 'Loading Discord Client');
|
|
|
|
|
Discord.init();
|
|
|
|
|
}
|
2021-09-19 04:03:13 -07:00
|
|
|
|
2022-06-06 20:11:54 +07:00
|
|
|
public loadLocale(): void {
|
|
|
|
|
Logger.log('info', 'Loading Locale');
|
|
|
|
|
Locale.init();
|
|
|
|
|
}
|
|
|
|
|
|
2021-09-19 04:03:13 -07:00
|
|
|
public load_osu(): void {
|
|
|
|
|
Logger.log('info', 'Loading osu! Client');
|
|
|
|
|
osu.init();
|
|
|
|
|
}
|
2022-08-26 06:36:45 +07:00
|
|
|
|
|
|
|
|
public loadExpress(): void {
|
|
|
|
|
Logger.log('info', 'Loading Express');
|
|
|
|
|
Express.init();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public endExpress(): void {
|
|
|
|
|
Logger.log('info', 'Ending Express');
|
|
|
|
|
Express.end();
|
|
|
|
|
}
|
2021-09-14 09:56:11 -07:00
|
|
|
}
|
|
|
|
|
|
2022-06-06 14:59:53 +07:00
|
|
|
export default new App();
|