You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
every route with a / at the end without this passing a parameter throws a ResourceNotFound
varrestify=require('restify');functionrespond(req,res,next){res.send('hello '+`${req.params.name||'nameless'}`);next();}varserver=restify.createServer();server.get('/hello/:name',respond);server.get('/hello',respond);server.get('/hello2/',respond);// <-- here throw ResourceNotFoundserver.listen(8080,function(){console.log('%s listening at %s',server.name,server.url);});
/hello and /hello2/ has the same configuration, the difference is that /hello2/ throws an exception
{
"code": "ResourceNotFound",
"message": "/hello2 does not exist"
}
this causes confusion if / is not intentional.
env
Restify Version: 7.0.0
Node.js Version: 8.9.3
The text was updated successfully, but these errors were encountered:
Hello
every route with a / at the end without this passing a parameter throws a ResourceNotFound
/hello
and/hello2/
has the same configuration, the difference is that/hello2/
throws an exceptionthis causes confusion if / is not intentional.
env
Restify Version: 7.0.0
Node.js Version: 8.9.3
The text was updated successfully, but these errors were encountered: