https run
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
|
"server": "node server.js",
|
||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"hoyahax-2025": "file:",
|
"hoyahax-2025": "file:",
|
||||||
|
"https-localhost": "^4.7.1",
|
||||||
"lucide-react": "^0.474.0",
|
"lucide-react": "^0.474.0",
|
||||||
"mongoose": "^8.9.5",
|
"mongoose": "^8.9.5",
|
||||||
"multer": "^1.4.5-lts.1",
|
"multer": "^1.4.5-lts.1",
|
||||||
|
|||||||
17
server.js
Normal file
17
server.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
const httpsLocalhost = require('https-localhost')()
|
||||||
|
const next = require('next')
|
||||||
|
|
||||||
|
const dev = process.env.NODE_ENV !== 'production'
|
||||||
|
const app = next({ dev })
|
||||||
|
const handle = app.getRequestHandler()
|
||||||
|
|
||||||
|
app.prepare().then(() => {
|
||||||
|
httpsLocalhost.listen(3000, (err) => {
|
||||||
|
if (err) throw err
|
||||||
|
console.log('> Ready on https://localhost:3000')
|
||||||
|
})
|
||||||
|
|
||||||
|
httpsLocalhost.all('*', (req, res) => {
|
||||||
|
return handle(req, res)
|
||||||
|
})
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user