refactor: add version in app config
This commit is contained in:
@@ -13,6 +13,7 @@ type AppConfig = {
|
|||||||
postgresHost: string;
|
postgresHost: string;
|
||||||
postgresUsername: string;
|
postgresUsername: string;
|
||||||
postgresPassword?: string;
|
postgresPassword?: string;
|
||||||
|
version: string;
|
||||||
postgresEnableSsl: boolean;
|
postgresEnableSsl: boolean;
|
||||||
baseUrl: string;
|
baseUrl: string;
|
||||||
encryptionKey: string;
|
encryptionKey: string;
|
||||||
@@ -44,6 +45,7 @@ const appConfig: AppConfig = {
|
|||||||
port,
|
port,
|
||||||
appEnv: appEnv,
|
appEnv: appEnv,
|
||||||
isDev: appEnv === 'development',
|
isDev: appEnv === 'development',
|
||||||
|
version: process.env.npm_package_version,
|
||||||
postgresDatabase: process.env.POSTGRES_DATABASE || 'automatisch_development',
|
postgresDatabase: process.env.POSTGRES_DATABASE || 'automatisch_development',
|
||||||
postgresPort: parseInt(process.env.POSTGRES_PORT || '5432'),
|
postgresPort: parseInt(process.env.POSTGRES_PORT || '5432'),
|
||||||
postgresHost: process.env.POSTGRES_HOST || 'localhost',
|
postgresHost: process.env.POSTGRES_HOST || 'localhost',
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
|
import appConfig from '../../config/app';
|
||||||
|
|
||||||
const healthcheck = () => {
|
const healthcheck = () => {
|
||||||
return {
|
return {
|
||||||
version: process.env.npm_package_version,
|
version: appConfig.version,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -125,7 +125,7 @@ class Telemetry {
|
|||||||
|
|
||||||
diagnosticInfo() {
|
diagnosticInfo() {
|
||||||
this.track('diagnosticInfo', {
|
this.track('diagnosticInfo', {
|
||||||
automatischVersion: process.env.npm_package_version,
|
automatischVersion: appConfig.version,
|
||||||
serveWebAppSeparately: appConfig.serveWebAppSeparately,
|
serveWebAppSeparately: appConfig.serveWebAppSeparately,
|
||||||
operatingSystem: {
|
operatingSystem: {
|
||||||
type: os.type(),
|
type: os.type(),
|
||||||
|
Reference in New Issue
Block a user