@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 +1 -1
- package/skeleton/app/config.js +2 -2
- package/skeleton/app/server.js +3 -1
- package/skeleton/pm2.config.js +2 -1
- package/.gitlab-ci.yml.example +0 -15
package/package.json
CHANGED
package/skeleton/app/config.js
CHANGED
|
@@ -35,13 +35,13 @@ config.autoloads = [
|
|
|
35
35
|
]
|
|
36
36
|
|
|
37
37
|
config.swagger = {
|
|
38
|
-
routePrefix:
|
|
38
|
+
routePrefix: `${config.prefix}/docs`,
|
|
39
39
|
exposeRoute: true,
|
|
40
40
|
addModels: true
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
config.healthCheck = {
|
|
44
|
-
exposeStatusRoute:
|
|
44
|
+
exposeStatusRoute: `${config.prefix}/health`
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
module.exports = config
|
package/skeleton/app/server.js
CHANGED
|
@@ -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
|
})
|
package/skeleton/pm2.config.js
CHANGED
|
@@ -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':
|
|
25
|
+
'post-deploy':
|
|
26
|
+
'yarn install --production; ~/node_modules/.bin/pm2 reload pm2.config.js'
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
}
|
package/.gitlab-ci.yml.example
DELETED