question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Something different in route management (restana v3)

See original GitHub issue

Hi, I think I found something different in route management at restana. Similar to express, restana was allowed to continue to the next route or path, but now something happened because in the last middleware next is an object and not a function. Example:

service.get('/try', (req, res, next) => { next() }, (req, res, next) => { if (typeof(next) == 'object') res.send('Oops'); else next() }) 
service.get('/ok', (req, res, next) => { res.send('Ok') })

Congrats

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
jkyberneeescommented, Jun 8, 2019

Great to hear! Please do not hesitate to contact again in you have further questions.

0reactions
kaesarcommented, Jun 8, 2019

Yeah, that’s right, I tested and works. So I appreciate your point. I haven’t found another issue about the use of next, just leave to your consideration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

throw in Async route · Issue #81 · BackendStack21/restana
If i throw an error on async function crash the server. app.post('/auth/google', async (req: any, res: any) => { throw new Error('Invalid google...
Read more >
restana - npm
Super fast and minimalist web framework for building REST micro-services.. Latest version: 4.9.6, last published: 2 months ago.
Read more >
Route Management Frameworks for AWS Lambda and Node JS
Some of the most popular route management frameworks in NodeJS are Express JS, Restify, Fastify, Loopback, Hapi JS, Koa, Loopback, etc. Serverless Route...
Read more >
Rest with Express.js nested router - Stack Overflow
Now to make Express routing modular I made a few router instances. There is a router for user, and a router for the...
Read more >
27 Prince St, Elizabeth, NJ 07208 - Crown Bank
Madeira, the sophisticated Pestana Casino Park, designed by the great master of world ... + daily breakfast + 3 rounds of golf with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found