Open
Description
My main code is very simple as below,
/// Set default middlewares (logger, static, cors and no-cache)
server.use(middlewares);
// To handle POST, PUT and PATCH you need to use a body-parser
// You can use the one used by JSON Server
server.use(jsonServer.bodyParser);
// Use default router
// server.use(jsonServer.rewriter({
// '/api/v1/': '/'
// }));
server.use('/api/v1', router);
server.listen(3000, () => {
console.log('JSON Server is running')
});
neither rewriter nor server.use('/api/v1', router)
worked, the access url only happened on /
not /api/v1/...
any idea?
Metadata
Metadata
Assignees
Labels
No labels