@uscreen.de/create-fastify-app 0.2.4 → 0.2.6

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@uscreen.de/create-fastify-app",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "cli to create a new @uscreen.de/fastify-app",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -35,13 +35,13 @@ config.autoloads = [
35
35
  ]
36
36
 
37
37
  config.swagger = {
38
- routePrefix: '/api/docs',
38
+ routePrefix: `${config.prefix}/docs`,
39
39
  exposeRoute: true,
40
40
  addModels: true
41
41
  }
42
42
 
43
43
  config.healthCheck = {
44
- exposeStatusRoute: '/api/health'
44
+ exposeStatusRoute: `${config.prefix}/health`
45
45
  }
46
46
 
47
47
  module.exports = config
@@ -1,13 +1,15 @@
1
1
  'use strict'
2
2
 
3
3
  const fastify = require('fastify')
4
+ const { name, version } = require('../package.json')
4
5
  const config = require('./config')
5
6
  const app = require('./app')
6
7
 
7
8
  const server = fastify({
8
9
  logger: config.logEnabled
9
10
  ? {
10
- level: config.logLevel
11
+ level: config.logLevel,
12
+ name: `${name} (v${version}) ${process.env.NODE_APP_INSTANCE}`
11
13
  }
12
14
  : false
13
15
  })
@@ -22,7 +22,8 @@ module.exports = {
22
22
  'pre-setup': 'yarn add pm2 pino-pretty;',
23
23
  'post-setup':
24
24
  'cp ./.env.example ../shared/.env; ln -s ../shared/.env ./.env',
25
- 'post-deploy': 'yarn install --production; yarn postdeploy'
25
+ 'post-deploy':
26
+ 'yarn install --production; ~/node_modules/.bin/pm2 reload pm2.config.js'
26
27
  }
27
28
  }
28
29
  }
@@ -1,15 +0,0 @@
1
- # image: node:10
2
-
3
- # cache:
4
- # paths:
5
- # - node_modules/
6
-
7
- # stages:
8
- # - test
9
-
10
- # test:
11
- # stage: test
12
- # script:
13
- # - yarn install
14
- # - yarn test:ci
15
- # coverage: '/^Statements\s*:\s*([^%]+)/'