@ckenx/kenx-fastify
Version:
Kenx fastify framework plugin
74 lines (73 loc) • 1.66 kB
TypeScript
export type JSObject<Type> = {
[index: string]: Type;
};
export type ApplicationConfig = {
plugin: string;
[index: string]: any;
};
export type Config = {
HOST: string;
PORT: number;
application?: ApplicationConfig;
};
export type ServerConfig = {
host: string;
port: number;
};
export type ApplicationSessionStore = {
provider: string;
db: string;
options: JSObject<any>;
};
export type ApplicationSessionConfigSet = {
type: 'in-memory' | 'store';
store?: ApplicationSessionStore;
options: JSObject<any>;
};
export type SessionConfig = {
plugin?: string;
allenv: ApplicationSessionConfigSet;
development?: ApplicationSessionConfigSet;
production?: ApplicationSessionConfigSet;
};
export type StaticAssetConfig = {
root: string;
options: JSObject<any>;
};
export type AssetStorageSpace = {
endpoint: string;
baseURL: string;
region: string;
bucket: string;
};
export type AssetStorageConfig = {
type: 'local' | 'cloud';
path?: string;
client?: {
key: string;
secret: string;
version?: string;
};
spaces?: AssetStorageSpace[];
};
export type AssetUploadConfig = {
maxFileSize: number;
mimeTypes: string[];
};
export type AssetConfig = {
plugin?: string;
storage: AssetStorageConfig;
upload: AssetUploadConfig;
static: StaticAssetConfig[];
};
export type RoutingConfig = {
plugin?: string;
profile: {
appname?: string;
version: string;
status: 'development' | 'operational' | 'maintenance' | 'deprecated';
};
ratelimit: {
maxRPS: number;
};
};