mirror of
https://github.com/complexcaresolutions/frontend.zweitmeinu.ng.git
synced 2026-03-17 16:13:48 +00:00
Required by Phusion Passenger on Plesk production. Must not be deleted by git clean or deploys will 500.
17 lines
501 B
JavaScript
17 lines
501 B
JavaScript
const { createServer } = require("http")
|
|
const { parse } = require("url")
|
|
const next = require("next")
|
|
|
|
const port = parseInt(process.env.PORT || "3000", 10)
|
|
const app = next({ dev: false })
|
|
const handle = app.getRequestHandler()
|
|
|
|
app.prepare().then(() => {
|
|
createServer((req, res) => {
|
|
const parsedUrl = parse(req.url, true)
|
|
handle(req, res, parsedUrl)
|
|
}).listen(port, "0.0.0.0", (err) => {
|
|
if (err) throw err
|
|
console.log("Next.js server ready on http://0.0.0.0:" + port)
|
|
})
|
|
})
|