https run

This commit is contained in:
Joseph J Helfenbein
2025-01-25 12:09:10 -05:00
parent 24f6d7a4df
commit 83cbfc0659
2 changed files with 19 additions and 0 deletions

View File

@@ -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
View 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)
})
})