mirror of
https://github.com/complexcaresolutions/frontend.blogwoman.de.git
synced 2026-03-17 16:14:00 +00:00
Fix bash-escaped \! in !== operator that caused SyntaxError. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
25 lines
757 B
JavaScript
25 lines
757 B
JavaScript
/**
|
|
* Plesk Node.js Manager Entry Point (Phusion Passenger)
|
|
* Starts Next.js production server for blogwoman.de
|
|
*/
|
|
|
|
const { createServer } = require("http")
|
|
const { parse } = require("url")
|
|
const next = require("next")
|
|
|
|
const port = parseInt(process.env.PORT || "3000", 10)
|
|
const dev = process.env.NODE_ENV !== "production"
|
|
const app = next({ dev })
|
|
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}`)
|
|
console.log(`Environment: ${process.env.NODE_ENV}`)
|
|
console.log(`Site: blogwoman.de`)
|
|
})
|
|
})
|