Sinatra-like DSL for developing web apps in Swift
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Sources Remove HTTP version from status line Feb 22, 2016
Tests Adopt Nest.ResponseType in Response Feb 13, 2016
.gitignore Create project Dec 5, 2015
.swift-version Add .swift-version May 21, 2016
LICENSE Create project Dec 5, 2015
Makefile Fix build Feb 7, 2016
Package.swift Upgrade http4swift to 0.2 Feb 22, 2016
README.md System Requirements May 15, 2016
wercker.yml Add matcher tests Jan 10, 2016

README.md

Swiftra

Swiftra is a library that provides DSLs like Sinatra.

System Requirements

DEVELOPMENT-SNAPSHOT-2016-02-08-a

Example

See swiftra-example.

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)