|
|
hace 11 años | |
|---|---|---|
| Common | hace 11 años | |
| Resources | hace 11 años | |
| Swifter | hace 11 años | |
| Swifter.xcodeproj | hace 11 años | |
| SwifterOSX | hace 11 años | |
| .gitignore | hace 11 años | |
| LICENSE | hace 12 años | |
| README.md | hace 11 años | |
| github.png | hace 12 años | |
| github_code.png | hace 12 años |
Tiny http server engine written in Swift ( https://developer.apple.com/swift/ ) programming language.
How to start ?
let server = HttpServer()
server["/hello"] = { .OK(.HTML("You asked for " + $0.url)) }
How to share files ?
if let publicDir = publicDir {
server["/home/(.+)"] = HttpHandlers.directory("~/")
}
How to redirect ?
server["/redirect"] = { request in
return .MovedPermanently("http://www.google.com")
}