We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我想实现自定义路由/detail/2333
/detail/2333
const express = require('express'); const next = require('next'); const dev = process.env.NODE_ENV !== 'production'; const app = next({ dev }); const handle = app.getRequestHandler(); app.prepare().then(() => { const server = express(); server.get('/detail/:id', (req, res) => { const actualPage = '/detail'; return app.render(req, res, actualPage); }); server.get('*', (req, res) => { handle(req, res); }); server.listen(8060, '0.0.0.0'); });
可是这样写没有效果,连服务都起不来了 求助
The text was updated successfully, but these errors were encountered:
报什么错,有截图吗,如果是npm包的问题,建议可以用yarn && yarn dev
Sorry, something went wrong.
No branches or pull requests
我想实现自定义路由
/detail/2333
可是这样写没有效果,连服务都起不来了
求助
The text was updated successfully, but these errors were encountered: