()
| 3 | import path from 'path'; |
| 4 | |
| 5 | export function setupApp(): FastifyInstance { |
| 6 | if (process.env.CSB) { |
| 7 | return fastify({ |
| 8 | logger: true, |
| 9 | }); |
| 10 | } |
| 11 | |
| 12 | const app = fastify({ |
| 13 | logger: true, |
| 14 | https: { |
| 15 | key: fs.readFileSync(path.join(__dirname, '../../certificates/cert.key')), |
| 16 | cert: fs.readFileSync(path.join(__dirname, '../../certificates/cert.crt')), |
| 17 | }, |
| 18 | }); |
| 19 | |
| 20 | app.log.level = process.env.NODE_ENV === 'test' ? 'error' : 'debug'; |
| 21 | |
| 22 | return app; |
| 23 | } |
no outgoing calls
no test coverage detected