Comments (5)
I added an improved router in 9352e79 and b661df6, which brings support for:
- Simple path parameters of the
{userId}
variety (required params) - Wildcard method handlers (
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!
from pogo.
Not at the moment, but this is absolutely an important feature that I want to have.
We need to port hapijs/call to Deno or otherwise build an improved router from scratch. At the moment, the routing logic is about as basic as it could possibly be. There are many features that I want the router to have, including preventing route conflicts.
Are you interested in helping with this?
from pogo.
Hi Seth,
Sorry for taking this long to answer.
I'd love to help, however, lately I don't have a lot of free time. I'll take a look at call
, maybe its an easy port :)
from pogo.
Just a minor update. I started writing my own router implementation from scratch - mostly as a learning exercise, but also so that pogo
can use it if it turns out well or in case hapijs/call
is difficult to port to Deno. I still think it would be good to use call
, as that is a complex piece of code that is battle tested and it already has a lot of features that I probably won't be able to get around to in my own implementation anytime soon. Help on this would be much appreciated. But I should have a basic dynamic router in place within the next week or two.
from pogo.
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
from pogo.
Related Issues (20)
- Allow React support to be optional HOT 12
- Middleware/ext support HOT 4
- Error when running example HOT 6
- Pre handlers for routes HOT 1
- Automatic body parsing HOT 5
- [RFC] Additional metadata for readme examples? HOT 7
- URL constructor in Deno 1.2 HOT 2
- CSSType 302 has no location HOT 1
- Consider using Pagic to build the website? HOT 1
- Disable secure cookies HOT 4
- First example doesnt work HOT 4
- not able to run example : server.js HOT 1
- SSE (Server Sent Events) support HOT 1
- Can't send file over IP HOT 6
- Can I use Pogo with Deno Deploy? HOT 6
- Support for React@17 HOT 2
- [Question] Check if handler already exists for route HOT 5
- [Bug] server.start never resolves despite successfully started HOT 3
- What do you use for validation? HOT 2
- Binding to Different IP? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pogo.