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

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