Kemal

快速、高效、简单的 Web 框架。「Fast, Effective, Simple Web Framework」

Github stars Tracking Chart

Kemal

闪电般的速度,超级简单的 Web 框架。

超简单

require "kemal"
# Matches GET "http://host:port/"
get "/" do
  "Hello World!"
end
# Creates a WebSocket handler.
# Matches "ws://host:port/socket"
ws "/socket" do |socket|
  socket.send "Hello from Kemal!"
end
Kemal.run

开始您的应用程序

crystal src/kemal_sample.cr

http://localhost:3000

查看 文档例子 了解更多。

安装

将此添加到你的应用程序的 shard.yml 中。

dependencies:
  kemal:
    github: kemalcr/kemal

另请参见 "入门"

特性

  • 支持所有 REST 动词
  • 支持 Websocket
  • 请求/响应上下文,简单的参数处理
  • 中间件支持
  • 内置 JSON 支持
  • 内置静态文件服务
  • 通过 Kilt 内置视图模板

文档

你可以在官方网站 kemalcr.com 阅读文档。

谢谢你

感谢 Manas 在 Frank 上的精彩工作。


Main metrics

Overview
Name With Ownerkemalcr/kemal
Primary LanguageCrystal
Program languageCrystal (Language Count: 2)
PlatformLinux, Mac, Windows, BSD, Windows Subsystem for Linux (WSL)
License:MIT License
所有者活动
Created At2015-10-23 16:56:29
Pushed At2025-04-18 13:10:39
Last Commit At2025-04-18 22:10:39
Release Count57
Last Release Namev1.7.1 (Posted on )
First Release Name0.1.1 (Posted on )
用户参与
Stargazers Count3.7k
Watchers Count73
Fork Count191
Commits Count821
Has Issues Enabled
Issues Count387
Issue Open Count0
Pull Requests Count265
Pull Requests Open Count1
Pull Requests Close Count51
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

Kemal

Kemal

Lightning Fast, Super Simple web framework.

Build Status
Join the chat at https://gitter.im/sdogruyol/kemal

Super Simple ⚡️

require "kemal"

# Matches GET "http://host:port/"
get "/" do
  "Hello World!"
end

# Creates a WebSocket handler.
# Matches "ws://host:port/socket"
ws "/socket" do