kemal v1.8.0
Kemal
Kemal is the Fast, Effective, Simple Web Framework for Crystal. It's perfect for building Web Applications and APIs with minimal code.
Why Kemal?
- 🚀 Lightning Fast: Built on Crystal, known for C-like performance
- 💡 Super Simple: Minimal code needed to get started
- 🛠 Feature Rich: Everything you need for modern web development
- 🔧 Flexible: Easy to extend with middleware support
Quick Start
-
First, make sure you have Crystal installed.
-
Add Kemal to your project's
shard.yml:
dependencies:
kemal:
github: kemalcr/kemal
- Create your first Kemal app:
require "kemal"
# Basic route - responds to GET "http://localhost:3000/"
get "/" do
"Hello World!"
end
# JSON API example
get "/api/status" do |env|
env.response.content_type = "application/json"
{"status": "ok"}.to_json
end
# WebSocket support
ws "/chat" do |socket|
socket.send "Hello from Kemal WebSocket!"
end
Kemal.run
- Run your application:
crystal run src/your_app.cr
- Visit http://localhost:3000 - That's it! 🎉
Key Features
- ✅ Full REST Support: Handle all HTTP verbs (GET, POST, PUT, DELETE, etc.)
- 🔌 WebSocket Support: Real-time bidirectional communication
- 📦 Built-in JSON Support: Native JSON handling
- 🗄️ Static File Serving: Serve your static assets easily
- 📝 Template Support: Built-in ECR template engine
- 🔒 Middleware System: Add functionality with middleware
- 🎯 Request/Response Context: Easy parameter and request handling
- 🍪 Session Management: Easy session handling with kemal-session
Learning Resources
Contributing
We love contributions! Please read our Contributing Guide to get started.
Acknowledgments
Special thanks to Manas for their work on Frank.
License
Kemal is released under the MIT License.
Repository
kemal
Owner
Statistic
- 3809
- 192
- 2
- 735
- 2
- 14 days ago
- October 23, 2015
License
MIT License
Links
Synced at
Thu, 04 Dec 2025 15:28:10 GMT
Languages