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
2017-03-04 16:24:05 +00:00
[![Build Status ](https://travis-ci.org/kemalcr/kemal.svg?branch=master )](https://travis-ci.org/kemalcr/kemal)
[![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
```
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
- Middlewares
- Built-in JSON support
- Built-in static file serving
2016-02-20 21:50:13 +00:00
- Built-in view templating via [Kilt ](https://github.com/jeromegn/kilt )
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 ).