1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

Update Config.ts

fixing uptime
This commit is contained in:
Patrik J. Braun 2020-09-10 19:40:44 +02:00 committed by GitHub
parent 586e944d6a
commit fad595923a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,8 @@ import {ConfigProperty, IConfigClass} from 'typeconfig/common';
declare const process: any; declare const process: any;
consts upTime = (new Date()).toISOString();
@ConfigClass({ @ConfigClass({
configPath: path.join(__dirname, './../../../../config.json'), configPath: path.join(__dirname, './../../../../config.json'),
saveIfNotExist: true, saveIfNotExist: true,
@ -46,7 +48,7 @@ export class PrivateConfigClass implements IPrivateConfig {
this.Server.Environment.appVersion = require('../../../../package.json').version; this.Server.Environment.appVersion = require('../../../../package.json').version;
this.Server.Environment.buildTime = require('../../../../package.json').buildTime; this.Server.Environment.buildTime = require('../../../../package.json').buildTime;
this.Server.Environment.buildCommitHash = require('../../../../package.json').buildCommitHash; this.Server.Environment.buildCommitHash = require('../../../../package.json').buildCommitHash;
this.Server.Environment.upTime = (new Date()).toISOString(); this.Server.Environment.upTime = upTime;
this.Server.Environment.isDocker = !!process.env['PI_DOCKER']; this.Server.Environment.isDocker = !!process.env['PI_DOCKER'];
} }