Popularity
9.4
Stable
Activity
0.0
Declining
171
13
6
Programming language: Crystal
License: MIT License
Tags:
Web Frameworks
raze alternatives and similar shards
Based on the "Web Frameworks" category.
Alternatively, view raze alternatives based on common mentions on social networks and blogs.
-
lucky
A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts. -
amber
A Crystal web framework that makes building applications fast, simple, and enjoyable. Get started with quick prototyping, less bugs, and blazing fast performance. -
runcobo
An api framework with type-safe params, elegant json serializer. Thanks for enjoying it! ๐ป๐ป https://runcobo.github.io/docs/ -
Shivneri
Component based MVC web framework based on fort architecture targeting good code structures, modularity & performance.
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
Promo
www.saashub.com
Do you think we are missing an alternative of raze or a related project?
Popular Comparisons
README
Raze
Raze for days.
Raze is a lightweight HTTP framework with a focus on building APIs and containerized services. If you want a more general purpose framwork with static file serving, check out Kemal.
Installation
Add this to your application's shard.yml
:
dependencies:
raze:
github: samueleaton/raze
Usage
require "raze"
get "/hello" do |ctx|
"hello, world!"
end
Raze.run
Raze takes a modular-first approach to middlewares
require "raze"
# Define middlewares
class Authenticator < Raze::Handler
def call(ctx, done)
puts "Authenticate here..."
done.call
end
end
class DDoSBlocker < Raze::Handler
def call(ctx, done)
puts "Prevent DDoS attack here..."
done.call
end
end
class UserFetcher < Raze::Handler
def call(ctx, done)
# Fetch user record from DB here...
ctx.state["user_name"] = "Sam"
done.call
end
end
# Define routes, attach middlewares
get "/api/**", [Authenticator.new, DDoSBlocker.new]
get "/api/user/:user_id", UserFetcher.new do |ctx|
"hello, #{ctx.state["user_name"]}!"
end
Raze.run
Contributing
- Fork it
- 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
TODO
Core
- [ ] Be able to run a stack of middlewares before the static file handler
- [ ] Remove all global scoping (e.g.
get "/"
->Raze.get "/"
) - [ ] Live reload functionality for development
- [ ] Be able to define middlewares globally (for all routes)
Middlewares
- [ ] Urlencoded and JSON body parser
- [ ] Multipart/form-data body parser
- [ ] Static asset caching
- should take a cache time interval and be able to take a path match regex
- [ ] Route caching
- be able to cache the response for a route for a predetermined time interval
- [ ] Favicon caching
- [ ] CORS response header
- [ ] Access logger
- [ ] Session tracking
- [ ] Proxy middleware
- [ ] Security Headers
- e.g. Node's Helmet
Contributors
- Sam Eaton - creator, maintainer