Open blakeblackshear opened 11 years ago
This seems a good idea. I'm actually evaluating on a better routing mechanism where multiple content handlers can be plugged-in.
But for now I guess you can write your own custom server, which uses page_server
as a middleware.
Sounds good. I would love to help as I am using punch for my entire development workflow on angular apps. Having a better understanding of where punch is heading would help me with future pull requests. On Jun 7, 2013 2:04 AM, "Lakshan Perera" notifications@github.com wrote:
This seems a good idea. I'm actually evaluating on a better routing mechanism where multiple content handlers can be plugged-in.
But for now I guess you can write your own custom server, which uses page_server as a middleware.
— Reply to this email directly or view it on GitHubhttps://github.com/laktek/punch/issues/86#issuecomment-19092122 .
I want to add the ability to forward requests to a path like
/api1/*
to a server.I could add this by putting in some middleware before the call to setup page_server in this line: https://github.com/laktek/punch/blob/master/lib/server.js#L34
However, I was thinking that there may be a better way to resolve urls than how it is done inside the page_server on this line: https://github.com/laktek/punch/blob/master/lib/page_server.js#L251
What about using route style matching from other serverside frameworks to be able to resolve the path with any arbitrary plugin from the config? I am thinking something like this in the config:
Thoughts? Am I trying to fit a square peg in a round hole?