better initialization
This commit is contained in:
@@ -51,7 +51,6 @@ module.exports = {
|
||||
// Doc: https://axios.nuxtjs.org/usage
|
||||
'@nuxtjs/axios',
|
||||
'@nuxtjs/auth',
|
||||
'@/server/initialize.server.js'
|
||||
],
|
||||
|
||||
serverMiddleware: ['server/routes'],
|
||||
|
||||
@@ -52,7 +52,9 @@ module.exports = function () {
|
||||
await sequelize.close()
|
||||
process.off('SIGTERM', shutdown)
|
||||
process.off('SIGINT', shutdown)
|
||||
nuxt.close()
|
||||
if (nuxt) {
|
||||
nuxt.close()
|
||||
}
|
||||
process.exit()
|
||||
}
|
||||
process.on('SIGTERM', shutdown)
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
const express = require('express')
|
||||
const cookieParser = require('cookie-parser')
|
||||
|
||||
|
||||
const initialize = require('./initialize.server')
|
||||
initialize()
|
||||
|
||||
// const metricsController = require('./metrics')
|
||||
// const promBundle = require('express-prom-bundle')
|
||||
// const metricsMiddleware = promBundle({ includeMethod: true })
|
||||
|
||||
Reference in New Issue
Block a user