1e61b69e31
This mirrors the `basePath: false` behavior for custom-routes with `locale: false` to allow users to configure the locales manually (`locale: false`) or have the locales be handled automatically for custom-routes. Fixes: https://github.com/vercel/next.js/issues/18927 Fixes: https://github.com/vercel/next.js/issues/18795
14 lines
336 B
JavaScript
14 lines
336 B
JavaScript
const http = require('http')
|
|
const mod = require('./.next/serverless/pages/another')
|
|
|
|
const server = http.createServer(async (req, res) => {
|
|
try {
|
|
await mod.render(req, res)
|
|
} catch (err) {
|
|
console.error(err)
|
|
res.statusCode = 500
|
|
res.end('internal error')
|
|
}
|
|
})
|
|
|
|
server.listen(3000, () => console.log('listening'))
|