2016-10-01 19:52:22 +00:00
2017-03-04 16:32:33 +00:00
[![Kemal ](https://avatars3.githubusercontent.com/u/15321198?v=3&s=200 )](http://kemalcr.com)
2015-06-01 21:06:26 +00:00
2017-03-04 16:32:33 +00:00
# Kemal
Lightning Fast, Super Simple web framework.
2017-03-04 16:08:26 +00:00
2021-03-15 05:47:14 +00:00
[![CI ](https://github.com/kemalcr/kemal/actions/workflows/ci.yml/badge.svg )](https://github.com/kemalcr/kemal/actions/workflows/ci.yml)
2017-03-04 16:24:05 +00:00
[![Join the chat at https://gitter.im/sdogruyol/kemal ](https://badges.gitter.im/Join%20Chat.svg )](https://gitter.im/sdogruyol/kemal?utm_source=badge& utm_medium=badge& utm_campaign=pr-badge& utm_content=badge)
2015-10-23 18:44:41 +00:00
2016-02-04 11:47:38 +00:00
# Super Simple ⚡️
2015-10-23 19:43:33 +00:00
```ruby
2015-10-24 13:48:47 +00:00
require "kemal"
2015-12-19 08:05:28 +00:00
# Matches GET "http://host:port/"
2015-10-23 19:43:33 +00:00
get "/" do
"Hello World!"
end
2015-12-19 08:05:28 +00:00
# Creates a WebSocket handler.
# Matches "ws://host:port/socket"
ws "/socket" do |socket|
socket.send "Hello from Kemal!"
end
2016-03-19 13:37:33 +00:00
Kemal.run
2015-10-23 19:43:33 +00:00
```
2016-03-19 13:37:33 +00:00
Start your application!
2015-10-24 16:20:49 +00:00
```
2016-03-19 13:37:33 +00:00
crystal src/kemal_sample.cr
2015-10-24 16:20:49 +00:00
```
2015-10-23 19:43:33 +00:00
Go to *http://localhost:3000*
2016-11-25 15:15:18 +00:00
Check [documentation ](http://kemalcr.com ) or [samples ](https://github.com/kemalcr/kemal/tree/master/samples ) for more.
2015-10-24 13:50:26 +00:00
2016-12-04 10:03:34 +00:00
# Installation
Add this to your application's `shard.yml` :
```yaml
dependencies:
2016-12-10 09:29:08 +00:00
kemal:
2016-12-04 10:03:34 +00:00
github: kemalcr/kemal
```
2018-04-24 13:25:04 +00:00
See also [Getting Started ](http://kemalcr.com/guide/ ).
2015-12-16 18:32:01 +00:00
# Features
2015-10-23 18:50:19 +00:00
2015-12-16 18:32:01 +00:00
- Support all REST verbs
- Websocket support
- Request/Response context, easy parameter handling
2017-12-23 09:27:41 +00:00
- Middleware support
2015-12-16 18:32:01 +00:00
- Built-in JSON support
- Built-in static file serving
2021-09-08 13:24:37 +00:00
- Built-in view templating via [ECR ](https://crystal-lang.org/api/ECR.html )
2015-11-23 18:52:28 +00:00
2015-12-16 18:34:30 +00:00
# Documentation
2016-02-06 13:30:10 +00:00
You can read the documentation at the official site [kemalcr.com ](http://kemalcr.com )
2015-12-16 18:34:30 +00:00
2015-10-23 19:51:39 +00:00
## Thanks
Thanks to Manas for their awesome work on [Frank ](https://github.com/manastech/frank ).