howToCodeWell / code-quiz

Code Quiz MonoRepo (API, API Client, App)
MIT License
4 stars 4 forks source link

Replace jsonServer.rewriter data with routes.json #27

Closed pfwd closed 2 years ago

pfwd commented 2 years ago

The following

{
    '/quiz/:slug': '/quiz?slug=:slug'
}

in

server.use(jsonServer.rewriter({
    '/quiz/:slug': '/quiz?slug=:slug'
}))

should be replaced by the routes.json file.

An attempt was made to use path.join(__dirname, 'routes.json'), as the first argument to jsonServer.rewriter but this did not work.

metinbaris commented 2 years ago

@pfwd Can work with this one