mirror of
https://github.com/sakaljurgis/kodi-api-server.git
synced 2026-07-08 20:37:41 +00:00
add config
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import * as Dotenv from 'dotenv';
|
||||
const dotenv: any = Dotenv.config().parsed;
|
||||
|
||||
class Config {
|
||||
public readonly port = dotenv.PORT;
|
||||
getPort() {
|
||||
return process.env.PORT;
|
||||
}
|
||||
//todo - check dotenv again if not loaded before emmiting err.
|
||||
//works globally, loaded once
|
||||
}
|
||||
|
||||
export default new Config();
|
||||
Reference in New Issue
Block a user