Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/takebayashi/swiftra
Sinatra-like DSL for developing web apps in Swift
https://github.com/takebayashi/swiftra
Last synced: 6 days ago
JSON representation
Sinatra-like DSL for developing web apps in Swift
- Host: GitHub
- URL: https://github.com/takebayashi/swiftra
- Owner: takebayashi
- License: mit
- Created: 2015-12-05T16:24:36.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-21T23:29:48.000Z (over 8 years ago)
- Last Synced: 2024-08-15T19:08:02.220Z (4 months ago)
- Language: Swift
- Homepage:
- Size: 29.3 KB
- Stars: 261
- Watchers: 12
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - swiftra - Sinatra-like DSL for developing web apps in Swift. (Server / Keychain)
- awesome-ios-star - swiftra - Sinatra-like DSL for developing web apps in Swift. (Server / Keychain)
README
# Swiftra
Swiftra is a library that provides DSLs like Sinatra.
## System Requirements
DEVELOPMENT-SNAPSHOT-2016-02-08-a
## Example
See [swiftra-example](https://github.com/takebayashi/swiftra-example).
```swift
import swiftraget("/hello") { req in
return "Hello, world!"
}post("/form") { req in
return "Hello: \(req.bodyString)"
}get("/404") { req in
return Response(.NotFound)
}serve(8080)
```