1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- import type { Auth } from './auth'
- import type { Logger } from './log'
- import type { Models } from './db'
- import type cors from 'cors'
- import type { Db, MongoClient } from 'mongodb'
- export interface Config {
- api: {
-
- prefix: string
- }
- auth: {
- jwt: {
-
- expiresIn: number
-
- secret: string
- }
- }
-
- cors: Parameters<typeof cors>[0]
- http: {
-
- host: string
-
- port: number
- }
- log: {
-
- level: string
- }
- mongo: {
-
- db: string
-
- uri: string
-
- useTransactions: boolean
- }
-
- shutdownTimeout: number
- }
- export interface Context {
- auth: Auth
- config: Config
-
- ctx(): Context
- db: Db
- log: Logger
- model: Models
- mongo: MongoClient
- }
|