2016-04-11 04:53:46 +08:00
|
|
|
import {ConfigLoader} from "./ConfigLoader";
|
2016-05-03 20:29:24 +08:00
|
|
|
import * as path from "path";
|
2016-04-11 04:53:46 +08:00
|
|
|
|
2016-04-22 19:23:44 +08:00
|
|
|
export enum DatabaseType{
|
|
|
|
memory, mongoDB
|
|
|
|
}
|
|
|
|
|
2016-05-09 23:04:56 +08:00
|
|
|
export class ConfigClass {
|
2016-04-11 04:53:46 +08:00
|
|
|
|
2016-05-09 23:04:56 +08:00
|
|
|
constructor() {
|
|
|
|
ConfigLoader.init(this, path.join(__dirname, './../../config.json'));
|
2016-04-11 04:53:46 +08:00
|
|
|
}
|
|
|
|
|
2016-05-01 16:46:21 +08:00
|
|
|
public PORT:number = 80;
|
2016-04-11 04:58:36 +08:00
|
|
|
|
|
|
|
public thumbnailSizes:Array<number> = [200];
|
|
|
|
public imagesFolder:string = "/demo/images";
|
|
|
|
public thumbnailFolder:string = "/demo/TEMP";
|
2016-04-22 19:23:44 +08:00
|
|
|
public databaseType:DatabaseType = DatabaseType.mongoDB;
|
2016-04-11 04:53:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export var Config = new ConfigClass();
|