2017-06-04 21:25:08 +08:00
|
|
|
import {PublicConfigClass} from "../public/ConfigClass";
|
|
|
|
import {DatabaseType, ServerConfig} from "./IPrivateConfig";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This configuration will be only at backend
|
|
|
|
*/
|
|
|
|
export class PrivateConfigClass extends PublicConfigClass {
|
|
|
|
|
|
|
|
public Server: ServerConfig = {
|
|
|
|
port: 80,
|
|
|
|
imagesFolder: "demo/images",
|
|
|
|
thumbnail: {
|
|
|
|
folder: "demo/TEMP",
|
2017-06-04 22:23:20 +08:00
|
|
|
hardwareAcceleration: true,
|
|
|
|
qualityPriority: true
|
2017-06-04 21:25:08 +08:00
|
|
|
},
|
|
|
|
database: {
|
|
|
|
type: DatabaseType.mysql,
|
|
|
|
mysql: {
|
|
|
|
host: "localhost",
|
|
|
|
username: "root",
|
|
|
|
password: "root",
|
|
|
|
database: "pigallery2"
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
public setDatabaseType(type: DatabaseType) {
|
|
|
|
this.Server.database.type = type;
|
|
|
|
if (type === DatabaseType.memory) {
|
|
|
|
this.Client.Search.searchEnabled = false;
|
|
|
|
this.Client.Search.instantSearchEnabled = false;
|
|
|
|
this.Client.Search.autocompleteEnabled = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|