Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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 swiftra

get("/hello") { req in
return "Hello, world!"
}

post("/form") { req in
return "Hello: \(req.bodyString)"
}

get("/404") { req in
return Response(.NotFound)
}

serve(8080)
```