Popularity
6.2
Declining
Activity
0.0
Stable
31
3
4
Programming language: Crystal
License: MIT License
Tags:
HTTP
crystal-routing alternatives and similar shards
Based on the "HTTP" category.
Alternatively, view crystal-routing alternatives based on common mentions on social networks and blogs.
-
route.cr
Minimum High Performance Middleware for Crystal Web Server. -
halite
💎HTTP Requests Client with a chainable REST API, built-in sessions and middlewares. -
Cable
It's like ActionCable (100% compatible with JS Client), but you know, for Crystal -
cossack
Simple and flexible HTTP client for Crystal with middleware and test support. -
http-protection
This library protects against typical web attacks. It was inspired in rack-protection Ruby gem. -
helmet
a port of the Node Helmet module to the Crystal programming language -
http-multiserver.cr
Mount multiple web applications 🚦 -
http-params-serializable
The HTTP params parsing module for Crystal 🤓 -
http_parser.cr
Crystal wrapper for Http Parser lib: https://github.com/joyent/http-parser -
multipart.cr
Adds multipart and multipart/form-data support to the crystal standard library -
proxy-fetcher.cr
Crystal port of awesome Ruby ProxyFetcher gem -
ContentDisposition
Crystal shard to create HTTP Content-Disposition headers with proper escaping/encoding of filenames -
http_distributor
http server which allows sneaky http request though it. -
router-simple.cr
simple path router inspired by Router::Simple. -
crystal-cossack
Simple and flexible HTTP client for Crystal with middleware and test support.
Access the most powerful time series database as a service
Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
Promo
www.influxdata.com
Do you think we are missing an alternative of crystal-routing or a related project?
README
crystal-routing
Extensible library to deal with http request and string based routing in Crystal.
Features:
- Building blocks to define others routing/delegation mechanisms
- Compiled time check method invocation
Installation
Add this to your application's shard.yml
:
dependencies:
routing:
github: bcardiff/crystal-routing
Usage
# file: app.cr
require "http/server"
require "routing"
class FooController
include Routing::Routable
def method1
HTTP::Response.ok "text/plain", "method1"
end
def method2
HTTP::Response.ok "text/plain", routing_context.params["id"]
end
end
module App
class Routes
include Routing::HttpRequestRouter
get "m1", "foo#method1"
get "foo/:id", "foo#method2"
root "foo#method1"
end
end
routes = App::Routes.new
server = HTTP::Server.new(8080) do |request|
routes.route(request)
end
puts "Listening on http://0.0.0.0:8080"
server.listen
Run the server
$ crystal app.cr
Use the server
$ curl http://localhost:8080
method1
$ curl http://localhost:8080/m1
method1
$ curl http://localhost:8080/foo/42
42
More in samples and specs
Development
TODO: Write instructions for development
Contributing
- Fork it ( https://github.com/bcardiff/crystal-routing/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
- bcardiff Brian J. Cardiff - creator, maintainer