DEV Community

Discussion on: Is There Any Overlap Between Swift Developers & Swifties?

Collapse
 
jmfayard profile image
Jean-Michel (jmfayard.dev) • Edited

Yes there is an overlap betwee Swift the language and Swift the singer.

Here is my proof

GitHub logo izqui / Taylor

A lightweight library for writing HTTP web servers with Swift

Taylor Version Carthage compatible Slack Status

Disclaimer: Not actively working on it anymore. You can check out some alternatives

Swift 2.0 required. Working with Xcode 7.1.

Disclaimer: It is a work in progress, it may break. Use it at your own risk.

Taylor is a library which allows you to create web server applications in Swift

Status

At this moment, Taylor only supports GET, POST and PUT HTTP requests. Better documentation is on the way.

Hello World

import Taylor

let server = Taylor.Server()

server.get("/") { req, res in
    res.bodyString = "Hello, world!"
    return .Send
}

let port = 3002
do {
   print("Starting server on port: \(port)")
   try server.serveHTTP(port: port, forever: true)
} catch {
   print("Server start failed \(error)")
}
Enter fullscreen mode Exit fullscreen mode

More advanced usage instructions…