Files
HoyaHax2025/server.js
Joseph J Helfenbein 83cbfc0659 https run
2025-01-25 12:09:10 -05:00

17 lines
425 B
JavaScript

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