2017-06-04 21:25:08 +08:00
|
|
|
import {PublicConfigClass} from "../public/ConfigClass";
|
2017-06-12 05:33:47 +08:00
|
|
|
import {DatabaseType, ServerConfig, ThumbnailProcessingLib} from "./IPrivateConfig";
|
2017-06-04 21:25:08 +08:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This configuration will be only at backend
|
|
|
|
*/
|
|
|
|
export class PrivateConfigClass extends PublicConfigClass {
|
|
|
|
|
2017-06-12 05:33:47 +08:00
|
|
|
public Server: ServerConfig = {
|
|
|
|
port: 80,
|
|
|
|
imagesFolder: "demo/images",
|
|
|
|
thumbnail: {
|
|
|
|
folder: "demo/TEMP",
|
|
|
|
processingLibrary: ThumbnailProcessingLib.sharp,
|
|
|
|
qualityPriority: true
|
|
|
|
},
|
|
|
|
database: {
|
|
|
|
type: DatabaseType.mysql,
|
|
|
|
mysql: {
|
|
|
|
host: "localhost",
|
|
|
|
username: "root",
|
|
|
|
password: "root",
|
|
|
|
database: "pigallery2"
|
2017-06-04 21:25:08 +08:00
|
|
|
|
2017-06-12 05:33:47 +08:00
|
|
|
}
|
|
|
|
},
|
2017-07-04 01:17:49 +08:00
|
|
|
sharing: {
|
|
|
|
updateTimeout: 1000 * 60 * 5
|
|
|
|
},
|
2017-06-12 05:33:47 +08:00
|
|
|
enableThreading: true
|
|
|
|
};
|
2017-06-04 21:25:08 +08:00
|
|
|
|
2017-06-12 05:33:47 +08:00
|
|
|
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;
|
2017-06-04 21:25:08 +08:00
|
|
|
}
|
2017-06-12 05:33:47 +08:00
|
|
|
}
|
2017-06-04 21:25:08 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
|