Comments (2)
Here's an idea:
scope: '/location', [ &authorized ], [
get.assuming('/location', -> $request, $response {
$response.html('<h1>Hello World!</h1>');
}),
post.assuming('/location', -> $request, $response {
$response.html('<h1>Hello World!</h1>');
})
];
from humming-bird.
We can also omit the assuming if we make the routing subroutines return route
objects, then just apply the middlewares to the objects.
from humming-bird.
Related Issues (20)
- Add express style routers HOT 1
- Blob file types cannot be served
- Perform some benchmarks/optimizations HOT 4
- Add simpler body decoding
- Add session system
- Investigate trie based routing HOT 1
- Add UTF-8 header default on responses
- Swappable back-ends HOT 5
- WebSockets
- Stash for templates? HOT 4
- POST body parsing fails HOT 13
- Missing single quote in routers example HOT 4
- Headers are case-sensitive HOT 1
- multipart/form-data POST body doesn't parse HOT 14
- filenames aren't parsed correctly in Glue HOT 2
- Some of code examples from README do not run successfully HOT 5
- Feature request: reload on source code changes HOT 4
- Feature request: Ability to listen not only on localhost HOT 4
- Feature request: simple configuration using some ( well known ) formats HOT 5
- SparkyCI build fails HOT 4
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 humming-bird.