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