rsnext/test/integration/i18n-support/server.js
JJ Kasper 1e61b69e31
Add locale: false for custom-routes + i18n (#19164)
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
2020-11-14 03:35:42 +00:00

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