Giter VIP home page Giter VIP logo

Comments (5)

sholladay avatar sholladay commented on August 15, 2024 1

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.

sholladay avatar sholladay commented on August 15, 2024

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.

victmo avatar victmo commented on August 15, 2024

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.

sholladay avatar sholladay commented on August 15, 2024

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.

sholladay avatar sholladay commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.