Skip to content
/ Taylor Public
forked from izqui/Taylor

A library for writing HTTP servers with Swift

Notifications You must be signed in to change notification settings

Pasanpr/Taylor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Taylor

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 and POST HTTP requests. It relies on xcodebuild to compile the binary, that's the reason of the existance of the Taylor.xcodeproj file

Demo

let taylor = Taylor(port: 5000)

taylor.get("/") {

   request, response in

    response.stringBody = "Hello World"
    response.send()

    return nil
}

taylor.startListening(forever: true)

Setup

You need to be running xCode 6 beta 2 or latest

$ git clone http://github.com/izqui/Taylor taylor-server
$ cd taylor-server
# edit main.swift
$ ./run 3000

Open localhost:3000

Documentation

Coming soon

Dependencies

Right now Taylor relies on an Objective-C library called GCDAsyncSocket. I want to do my own implementation in Swift in the future.

Inspiration

About

A library for writing HTTP servers with Swift

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 88.6%
  • Swift 11.3%
  • Shell 0.1%