Popularity
1.7
Stable
Activity
0.0
Stable
5
2
0
Programming language: Crystal
License: MIT License
Tags:
HTTP
router-simple.cr alternatives and similar shards
Based on the "HTTP" category.
Alternatively, view router-simple.cr alternatives based on common mentions on social networks and blogs.
-
http-protection
This library protects against typical web attacks. It was inspired in rack-protection Ruby gem. -
multipart.cr
DISCONTINUED. Adds multipart and multipart/form-data support to the crystal standard library -
ContentDisposition
Crystal shard to create HTTP Content-Disposition headers with proper escaping/encoding of filenames
InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
Promo
www.influxdata.com
Do you think we are missing an alternative of router-simple.cr or a related project?
README
router-simple
simple path router inspired by Router::Simple.
Installation
Add it to Projectfile
deps do
github "karupanerura/router-simple.cr"
end
Usage
require "router-simple"
dispatcher = Router::Simple::Dispatcher(Hash(Symbol, String)).new()
dispatcher.add("/", {
:controller => "Root",
:action => "index",
})
dispatcher.add("/users/:user_id", {
:controller => "Users",
:action => "fetch_by_id",
})
dispatcher.match("/") {|result|
p result.route.meta[:controller] # => "Root"
}
dispatcher.match("/users/1") {|result|
p result.route.meta[:controller] # => "Users"
p result.match["user_id"] # => "1"
}
Development
TODO: Write instructions for development
Contributing
- Fork it ( https://github.com/karupanerura/router-simple.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- karupanerura(https://github.com/karupanerura) karupanerura - creator, maintainer