Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/werner/kemal-filters
Filters callback, similar to sinatra: http://www.sinatrarb.com/intro.html#Filters
https://github.com/werner/kemal-filters
Last synced: 7 days ago
JSON representation
Filters callback, similar to sinatra: http://www.sinatrarb.com/intro.html#Filters
- Host: GitHub
- URL: https://github.com/werner/kemal-filters
- Owner: werner
- License: mit
- Created: 2016-01-30T20:01:59.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-23T21:20:07.000Z (over 8 years ago)
- Last Synced: 2023-03-18T04:55:24.963Z (over 1 year ago)
- Language: Crystal
- Size: 3.91 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Disclaimer:
This shard has been merged in kemal itself.# kemal-filters
Filters callback for Kemal, similar to sinatra: http://www.sinatrarb.com/intro.html#Filters
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
kemal-filters:
github: werner/kemal-filters
```## Usage
```crystal
require "kemal"
require "kemal-filters"add_filters
before "/home" do |env|
env.redirect "/other"
endget "/home" do
"Hello World"
endget "/other" do
"Other Page"
end
```## Contributing
1. Fork it ( https://github.com/werner/kemal-filters/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request## Contributors
- [werner](https://github.com/werner) Werner - creator, maintainer