refactor(config): derive APP_NAME and APP_VERSION defaults from package.json
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
import { IsInt, IsString, Min, Max } from 'class-validator';
|
import { IsInt, IsString, Min, Max } from 'class-validator';
|
||||||
|
|
||||||
|
import pkg from '../../package.json';
|
||||||
|
|
||||||
export class AppConfig {
|
export class AppConfig {
|
||||||
@IsString()
|
@IsString()
|
||||||
NODE_ENV: string = 'development';
|
NODE_ENV: string = 'development';
|
||||||
@@ -10,8 +12,8 @@ export class AppConfig {
|
|||||||
PORT: number = 3000;
|
PORT: number = 3000;
|
||||||
|
|
||||||
@IsString()
|
@IsString()
|
||||||
APP_NAME: string = 'liquio-qa-bot';
|
APP_NAME: string = pkg.name;
|
||||||
|
|
||||||
@IsString()
|
@IsString()
|
||||||
APP_VERSION: string = '1.0.0';
|
APP_VERSION: string = pkg.version;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user