UNPKG

1.98 kBTypeScriptView Raw
1/// <reference types="node" />
2import https from 'https';
3import Koa from 'koa';
4import KoaRouter from 'koa-router';
5import KoaStaticCache from 'koa-static-cache';
6import mongoose from 'mongoose';
7import SocketIO from 'socket.io';
8export interface IServerAppConfig {
9 name: string;
10 models?: mongoose.Model<mongoose.Document>[];
11 mongooseConnectionOptions?: mongoose.ConnectionOptions;
12 mongoUris?: string;
13 httpServers?: {
14 hostname?: string;
15 port: number;
16 /**
17 * @deprecated Use <code>hostname<code> instead. This will be removed in version 2.
18 */
19 path?: string;
20 }[];
21 httpsServers?: {
22 opts: https.ServerOptions;
23 hostname?: string;
24 port: number;
25 /**
26 * @deprecated Use <code>hostname<code> instead. This will be removed in version 2.
27 */
28 path?: string;
29 }[];
30 publicDirs?: string[];
31 routers?: KoaRouter[];
32 sockets?: SocketIO.Server[];
33 spaFileRelativePath?: string;
34 bodyParser?: boolean;
35 bodyParserEnableForm?: boolean;
36 bodyParserEnableJson?: boolean;
37 bodyParserEnableText?: boolean;
38 bodyParserEncoding?: string;
39 bodyParserFormLimit?: string;
40 bodyParserJsonLimit?: string;
41 bodyParserMultipart?: boolean;
42 bodyParserTextLimit?: string;
43 cacheControl?: string;
44 cacheFiles?: KoaStaticCache.Files;
45 cacheOptions?: KoaStaticCache.Options;
46 compress?: boolean;
47 keys?: string[];
48 json?: boolean;
49 jsonPretty?: boolean;
50 jsonPrettyParam?: string;
51 jsonSpaces?: number;
52 log?: boolean;
53 session?: boolean;
54 sessionCookieKey?: string;
55 sessionHttpOnly?: boolean;
56 sessionMaxAge?: number | 'session';
57 sessionOverwrite?: boolean;
58 sessionRenew?: boolean;
59 sessionRolling?: boolean;
60 sessionSigned?: boolean;
61 middleware?: Koa.Middleware[];
62}
63//# sourceMappingURL=i-server-app-config.d.ts.map
\No newline at end of file