mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Remove dead code
This commit is contained in:
parent
656834fa0b
commit
8bf11b18aa
@ -1,36 +0,0 @@
|
||||
const express = require('express')
|
||||
const consola = require('consola')
|
||||
const { Nuxt, Builder } = require('nuxt')
|
||||
const app = express()
|
||||
|
||||
require('dotenv').config()
|
||||
|
||||
const host = process.env.HOST || '127.0.0.1'
|
||||
const port = process.env.PORT || 3000
|
||||
app.set('port', port)
|
||||
|
||||
// Import and Set Nuxt.js options
|
||||
let config = require('../nuxt.config.js')
|
||||
config.dev = !(process.env.NODE_ENV === 'production')
|
||||
|
||||
async function start() {
|
||||
// Init Nuxt.js
|
||||
const nuxt = new Nuxt(config)
|
||||
|
||||
// Build only in dev mode
|
||||
if (config.dev) {
|
||||
const builder = new Builder(nuxt)
|
||||
await builder.build()
|
||||
}
|
||||
|
||||
// Give nuxt middleware to express
|
||||
app.use(nuxt.render)
|
||||
|
||||
// Listen the server
|
||||
app.listen(port, host)
|
||||
consola.ready({
|
||||
message: `Server listening on http://${host}:${port}`,
|
||||
badge: true,
|
||||
})
|
||||
}
|
||||
start()
|
||||
Loading…
x
Reference in New Issue
Block a user