Dynamic routes
See original GitHub issueIs there a way to support dynamic routes?
Something like:
server.route({
method: 'GET',
path: '/v2/users/{userId}/books',
handler: (req, h) => {...}
})
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Dynamic Routes - Next.js
Dynamic Routes are pages that allow you to add custom params to your URLs. Start creating Dynamic Routes and learn more here.
Read more >Routing in Next.js – How to Set Up Dynamic Routing with Pre ...
In this tutorial, you'll learn how to set up dynamic routing in Next.js. You'll also learn about pre-rendering and why it's important.
Read more >Static vs. dynamic routing: What is the difference? - TechTarget
Dynamic routing, sometimes called adaptive routing, is more complex than static routing because it creates more possible routes to send packets across a ......
Read more >How to Create Dynamic Routes in Next.js - MakeUseOf
Dynamic routes are pages that allow you to use custom parameters in a URL. They are especially beneficial when creating pages for dynamic ......
Read more >Dynamic routing - Wikipedia
Dynamic routing, also called adaptive routing, is a process where a router can forward data via a different route for a given destination...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I added an improved router in https://github.com/sholladay/pogo/commit/9352e7905e95c5790d5f5f6944bc7bd0d9f4e4b2 and https://github.com/sholladay/pogo/commit/b661df64ae2dab0ae9528ae40fe6bf2dc2e92ef4, which brings support for:
{userId}variety (required params)method: '*'in route config)server.inject()to make a request directly to the server without using the network (useful when writing tests)There are still many improvements that should be made to the router. Among them, optional params and params that cover part of a segment or multiple segments are not yet supported. But it’s a reasonable place to start and we can deal with the rest in separate issues. Let me know how it works for you!
I just published a new release with these changes, as well as other routing improvements and bugfixes.
https://github.com/sholladay/pogo/releases/tag/v0.2.0