Interface: AppConfig
Configuration for the server Express.js app.
Properties
apiPrefix
• Optional
apiPrefix: string
Prefix for all API routes. Defaults to /api/v1
.
Defined in
packages/mongodb-chatbot-server/src/app.ts:45
conversationsRouterConfig
• conversationsRouterConfig: ConversationsRouterParams
Configuration for the conversations router.
Defined in
packages/mongodb-chatbot-server/src/app.ts:29
corsOptions
• Optional
corsOptions: CorsOptions
Configuration for CORS middleware. Defaults to allowing all origins.
Defined in
packages/mongodb-chatbot-server/src/app.ts:40
expressAppConfig
• Optional
expressAppConfig: (app
: Express
) => Promise
<void
>
Type declaration
▸ (app
): Promise
<void
>
Additional server logic using the server's Express
app object.
Can do things like add additional, routes, global middleware, etc.
Runs immediately after the app is instantiated,
before additional routes and middleware are added.
Parameters
Name | Type |
---|---|
app | Express |
Returns
Promise
<void
>
Example
(app)=> {
app.get("/", (req, res) => res.send({ hello: "world" }))
}
Defined in
packages/mongodb-chatbot-server/src/app.ts:57
maxRequestTimeoutMs
• Optional
maxRequestTimeoutMs: number
Maximum time in milliseconds for a request to complete before timing out. Defaults to 60000 (1 minute).