main
kavehjamshidi 2 weeks ago
parent fe299f5e57
commit 8eedd470e2
  1. 4
      controller/index.js
  2. 1
      server.js

@ -16,9 +16,9 @@ export default function (fastify, opts, done) {
await operation.test(fastify.req, fastify.reply) await operation.test(fastify.req, fastify.reply)
}); });
fastify.get('/enter', operation.sanaEnter()); fastify.get('/enter', operation.sanaEnter);
fastify.get('/exit', operation.sanaExit()); fastify.get('/exit', operation.sanaExit);
done(); done();
}; };

@ -9,6 +9,7 @@ fastify.register(index)
try { try {
await fastify.listen({ port: 3000 }) await fastify.listen({ port: 3000 })
console.log('Server ready on port 3000')
} catch (err) { } catch (err) {
fastify.log.error(err) fastify.log.error(err)
process.exit(1) process.exit(1)

Loading…
Cancel
Save