diff --git a/src/redocly.yaml b/src/redocly.yaml index 2c061f2..e54e41f 100644 --- a/src/redocly.yaml +++ b/src/redocly.yaml @@ -5,6 +5,8 @@ apis: root: ./user/openapi.json chat: root: ./chat/openapi.json + ttt: + root: ./tic-tac-toe/openapi.json rules: info-license: warn diff --git a/src/tic-tac-toe/src/run.ts b/src/tic-tac-toe/src/run.ts index dc06dc8..3c59d5d 100644 --- a/src/tic-tac-toe/src/run.ts +++ b/src/tic-tac-toe/src/run.ts @@ -4,33 +4,18 @@ import fastify, { FastifyInstance } from 'fastify'; import app from './app'; const start = async () => { - const envToLogger = { - development: { - // transport: { - // target: 'pino', - // options: { - // translateTime: 'HH:MM:ss Z', - // ignore: 'pid,hostname', - // }, - // }, - }, - production: true, - test: false, - }; - - const f: FastifyInstance = fastify({ logger: envToLogger.development }); + const f: FastifyInstance = fastify({ logger: { level: 'info' } }); + process.on('SIGTERM', () => { + f.log.warn('Requested to shutdown'); + process.exit(134); + }); try { - process.on('SIGTERM', () => { - f.log.info('Requested to shutdown'); - process.exit(134); - }); - console.log('-------->Serving static files from:'); await f.register(app, {}); await f.listen({ port: 80, host: '0.0.0.0' }); } catch (err) { f.log.error(err); process.exit(1); - }; + } }; start(); diff --git a/src/tic-tac-toe/vite.config.js b/src/tic-tac-toe/vite.config.js index ba669e5..3d8be45 100644 --- a/src/tic-tac-toe/vite.config.js +++ b/src/tic-tac-toe/vite.config.js @@ -27,7 +27,7 @@ const externals = collectDeps( export default defineConfig({ root: __dirname, define: { - __SERVICE_NAME: '"tic-tac-toe"', + __SERVICE_NAME: '"ttt"', }, // service root plugins: [tsconfigPaths(), nodeExternals()],