UNPKG

823 BJavaScriptView Raw
1const API_PORT = process.env.PORT || 5000;
2const DOCS_PORT = process.env.DOCS_PORT || 3000;
3
4module.exports = {
5 port: DOCS_PORT,
6 swaggerDefinition: {
7 info: {
8 title: 'ACE API', // Title (required)
9 version: '0.0.0', // Version (required)
10 },
11 host: `localhost:${API_PORT}`,
12 basePath: '/',
13 schemes: ['http', 'https'],
14 securityDefinitions: {
15 ApiToken: {
16 type: 'apiKey',
17 in: 'header',
18 name: 'X-Api-Token',
19 },
20 },
21 security: [
22 {
23 ApiToken: [],
24 },
25 ],
26 responses: {
27 UnauthorizedError: {
28 description: 'API key is missing or invalid',
29 headers: {
30 'WWW_Authenticate': {
31 type: 'string',
32 },
33 },
34 },
35 },
36 },
37 apis: ['./routes/*.js'], // Path to the API docs
38};