@nitra/fastify 2.0.4 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nitra/fastify",
3
3
  "description": "Fastify helper",
4
- "version": "2.0.4",
4
+ "version": "2.1.1",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "files": [
@@ -24,7 +24,7 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@fastify/sensible": "^6.0.1",
27
- "@nitra/pino": "^1.2.1",
27
+ "@nitra/pino": "^1.3.2",
28
28
  "fastify": "^5.0.0"
29
29
  }
30
30
  }
package/src/index.js CHANGED
@@ -23,6 +23,10 @@ app.options('/*', async (req, reply) => {
23
23
  reply.code(200).send()
24
24
  })
25
25
 
26
+ app.get('/healthz', function (_request, reply) {
27
+ reply.code(200).send({ statusCode: 200, status: 'ok' })
28
+ })
29
+
26
30
  app.addHook('preHandler', (req, reply, done) => {
27
31
  // Ручний cors, бо WildcardOrigin Not Allowed
28
32
  setHeaders(req, reply)
package/src/pubsub.js CHANGED
@@ -16,6 +16,10 @@ export const app = fastify({
16
16
  // done()
17
17
  // })
18
18
 
19
+ app.get('/healthz', function (_request, reply) {
20
+ reply.code(200).send({ statusCode: 200, status: 'ok' })
21
+ })
22
+
19
23
  /**
20
24
  * Запускаємо сервер
21
25
  */