fixed small issues

This commit is contained in:
Maieul BOYER 2025-12-22 17:46:04 +01:00
parent be9f5ad33a
commit 782e13cd63
No known key found for this signature in database
3 changed files with 9 additions and 22 deletions

View file

@ -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

View file

@ -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 });
try {
const f: FastifyInstance = fastify({ logger: { level: 'info' } });
process.on('SIGTERM', () => {
f.log.info('Requested to shutdown');
f.log.warn('Requested to shutdown');
process.exit(134);
});
console.log('-------->Serving static files from:');
try {
await f.register(app, {});
await f.listen({ port: 80, host: '0.0.0.0' });
}
catch (err) {
f.log.error(err);
process.exit(1);
};
}
};
start();

View file

@ -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()],