mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 18:59:19 +00:00
Don't start web server if env is not there
This commit is contained in:
@@ -44,6 +44,10 @@ class App {
|
||||
}
|
||||
|
||||
public loadExpress(): void {
|
||||
if (!Environment.get().WEB_HOST || !Environment.get().WEB_PORT) {
|
||||
Logger.log('warn', 'WEB_HOST or WEB_PORT is not defined in .env, not starting web server');
|
||||
return;
|
||||
}
|
||||
Logger.log('info', 'Loading Express');
|
||||
Express.init();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class Express {
|
||||
}
|
||||
|
||||
public end(): void {
|
||||
if(this.server != null)
|
||||
if(this.server)
|
||||
this.server.close();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user