1 |
|
2 | import https from 'https';
|
3 | import Koa from 'koa';
|
4 | import KoaRouter from 'koa-router';
|
5 | import KoaStaticCache from 'koa-static-cache';
|
6 | import mongoose from 'mongoose';
|
7 | import SocketIO from 'socket.io';
|
8 | export 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 |
|
18 |
|
19 | path?: string;
|
20 | }[];
|
21 | httpsServers?: {
|
22 | opts: https.ServerOptions;
|
23 | hostname?: string;
|
24 | port: number;
|
25 | |
26 |
|
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 |
|
\ | No newline at end of file |