2017-06-04 21:25:08 +08:00
|
|
|
export enum DatabaseType{
|
|
|
|
memory = 0, mysql = 1
|
|
|
|
}
|
|
|
|
export enum LogLevel {
|
|
|
|
error, warn, info, debug, verbose
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface MySQLConfig {
|
|
|
|
host: string;
|
|
|
|
database: string;
|
|
|
|
username: string;
|
|
|
|
password: string;
|
|
|
|
}
|
|
|
|
export interface DataBaseConfig {
|
|
|
|
type: DatabaseType;
|
|
|
|
mysql?: MySQLConfig;
|
|
|
|
}
|
|
|
|
export interface ThumbnailConfig {
|
|
|
|
folder: string;
|
|
|
|
hardwareAcceleration: boolean;
|
2017-06-04 22:23:20 +08:00
|
|
|
qualityPriority: boolean;
|
2017-06-04 21:25:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ServerConfig {
|
|
|
|
port: number;
|
|
|
|
imagesFolder: string;
|
|
|
|
thumbnail: ThumbnailConfig;
|
|
|
|
database: DataBaseConfig;
|
2017-06-11 04:32:56 +08:00
|
|
|
enableThreading:boolean;
|
2017-06-04 21:25:08 +08:00
|
|
|
}
|