kylef-archive/Curassow
关于
使用预派生工作进程模型的 Swift HTTP 服务器
系统与基础设施实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Curassow
Curassow is a Swift Nest HTTP Server. It uses the pre-fork worker model and it's similar to Python's Gunicorn and Ruby's Unicorn.
It exposes a Nest-compatible interface for your application, allowing you to use Curassow with any Nest compatible web frameworks of your choice.
Documentation
Full documentation can be found on the Curassow website: https://curassow.fuller.li
Usage
To use Curassow, you will need to install it via the Swift Package Manager,
you can add it to the list of dependencies in your Package.swift:
import PackageDescription
let package = Package(
name: "HelloWorld",
dependencies: [
.Package(url: "https://github.com/kylef/Curassow.git", majorVersion: 0, minor: 6),
]
)
Afterwards you can place your web application implementation in Sources
and add the runner inside main.swift which exposes a command line tool to
run your web application:
import Curassow
import Inquiline
serve { request in
return Response(.ok, contentType: "text/plain", body: "Hello World")
}
Then build and run your application:
$ swift build --configuration release
Example Application
You can find a hello world example application that uses Curassow.
License
Curassow is licensed under the BSD license. See LICENSE for more info.
探索相关项目
加载中…