1 |
|
2 | export declare const ENV: string;
|
3 | import 'deps-check';
|
4 | import Express from 'express';
|
5 | import { SessionOptions } from 'express-session';
|
6 | import { DBOptions } from './dbInit';
|
7 | import { BaseDB, SchemaConstraint } from './Orm/PostgresqlDriver';
|
8 | import * as bodyparser from 'body-parser';
|
9 | import serveStatic from 'serve-static';
|
10 | import https from 'https';
|
11 | import http from 'http';
|
12 | import { Pool } from 'pg';
|
13 | export * from './di';
|
14 | export * from './graphQLUtils';
|
15 | export * from './Orm/PostgresqlDriver';
|
16 | export * from './request';
|
17 | export * from './testUtils';
|
18 | export * from './utils';
|
19 | export * from './dateUtils';
|
20 | export * from './assert';
|
21 | export * from './logger';
|
22 | export declare const bodyParser: typeof bodyparser;
|
23 | export declare const PRODUCTION: boolean;
|
24 | interface Options {
|
25 | https?: {
|
26 | privateKeyFile: string;
|
27 | certificateFile: string;
|
28 | port?: number;
|
29 | };
|
30 | session?: SessionOptions;
|
31 | db?: DBOptions;
|
32 | graphql: {
|
33 | schema: string;
|
34 | resolver: object;
|
35 | };
|
36 | static?: {
|
37 | rootDir: string;
|
38 | options?: serveStatic.ServeStaticOptions;
|
39 | };
|
40 | parcel?: {
|
41 | indexFilename: string;
|
42 | };
|
43 | errors: {
|
44 | unknown: unknown;
|
45 | };
|
46 | port: number;
|
47 | }
|
48 | interface Result<DBSchema extends SchemaConstraint> {
|
49 | server: https.Server | http.Server;
|
50 | express: Express.Express;
|
51 | projectDir: string;
|
52 | db: BaseDB<DBSchema>;
|
53 | dbPool: Pool;
|
54 | }
|
55 | export declare function createGraphqApp<DBSchema extends SchemaConstraint>(options: Options, runMiddlewares?: (app: Result<DBSchema>) => Promise<void>): Promise<Result<DBSchema>>;
|
56 | export declare function asyncThread(fn: (req: Express.Request, res: Express.Response) => Promise<unknown>): Express.Handler;
|
57 |
|
\ | No newline at end of file |