-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
39 lines (38 loc) · 1.09 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const { defaultMaxListeners } = require("events");
module.exports = {
rest: {
port: +(process.env.PORT ?? 3000),
host: process.env.HOST,
// The `gracePeriodForClose` provides a graceful close for http/https
// servers with keep-alive clients. The default value is `Infinity`
// (don't force-close). If you want to immediately destroy all sockets
// upon stop, set its value to `0`.
// See https://www.npmjs.com/package/stoppable
gracePeriodForClose: 5000, // 5 seconds
openApiSpec: {
// useful when used with OpenAPI-to-GraphQL to locate your application
setServersFromRequest: true,
},
},
rabbitmq: {
uri: process.env.RABBITMQ_URI,
defaultHandlerError: parseInt(process.env.RABBITMQ_HANDLER_ERROR),
exchanges: [{
name: 'dlx.amq.topic',
type: 'topic'
}],
queues: [
{
name: 'dlx.sync-videos',
options: {
deadLetterExchange: 'amq.topic',
messageTtl: 10000
},
exchange: {
name: "dlx.amq.topic",
routingKey: "model.*.*"
},
}
],
}
};