{"id":1982,"url":"https://github.com/izqui/Taylor","last_synced_at":"2025-08-02T05:33:24.751Z","repository":{"id":56923868,"uuid":"21139951","full_name":"izqui/Taylor","owner":"izqui","description":"A lightweight library for writing HTTP web servers with Swift","archived":false,"fork":false,"pushed_at":"2016-07-19T20:01:04.000Z","size":19323,"stargazers_count":926,"open_issues_count":13,"forks_count":79,"subscribers_count":49,"default_branch":"master","last_synced_at":"2024-12-04T04:03:35.604Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/izqui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-23T19:48:20.000Z","updated_at":"2024-07-17T07:55:20.000Z","dependencies_parsed_at":"2022-11-29T13:20:32.442Z","dependency_job_id":null,"html_url":"https://github.com/izqui/Taylor","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izqui%2FTaylor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izqui%2FTaylor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izqui%2FTaylor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izqui%2FTaylor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/izqui","download_url":"https://codeload.github.com/izqui/Taylor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228041355,"owners_count":17860221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:16:00.468Z","updated_at":"2024-12-06T09:30:48.336Z","avatar_url":"https://github.com/izqui.png","language":"Swift","funding_links":[],"categories":["Server","Libs","HarmonyOS","HTTP","CLI and Server"],"sub_categories":["Keychain","Other free courses","Network","Windows Manager"],"readme":"# Taylor [![Version](https://img.shields.io/cocoapods/v/Taylor.svg?style=flat)](http://cocoapods.org/pods/Taylor) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Slack Status](https://taylor-framework.herokuapp.com/badge.svg)](https://taylor-framework.herokuapp.com)\n\n### Disclaimer: Not actively working on it anymore. You can check out [some](https://github.com/qutheory/vapor) [alternatives](https://github.com/IBM-Swift/Kitura)\n\nSwift 2.0 required. Working with Xcode 7.1.\n\nDisclaimer: It is a work in progress, it may break. Use it at your own risk.\n\nTaylor is a library which allows you to create web server applications in [Swift](https://developer.apple.com/swift/)\n\n## Status\nAt this moment, Taylor only supports GET, POST and PUT HTTP requests. Better documentation is on the way.\n\n## Hello World\n\n```swift\n\nimport Taylor\n\nlet server = Taylor.Server()\n\nserver.get(\"/\") { req, res in\n    res.bodyString = \"Hello, world!\"\n    return .Send\n}\n\nlet port = 3002\ndo {\n   print(\"Starting server on port: \\(port)\")\n   try server.serveHTTP(port: port, forever: true)\n} catch {\n   print(\"Server start failed \\(error)\")\n}\n```\n\nMore advanced usage instructions coming soon!\n\n## Playground\nThe easiest way to try out Taylor is using a playground.\n\nFor this, you need to have Carthage installed in your computer, is what it is used for fetching the dependencies.\n\n```sh\n$ git clone https://github.com/izqui/Taylor.git -b playground\n$ cd taylor\n$ sh setup.sh\n```\n\nAnd that's it, you should be good to go. Have fun!\n\n## Usage\nYou can use Taylor from the command line using [CocoaPods Rome](https://github.com/neonichu/Rome) or [Carthage](https://github.com/Carthage/Carthage) as dependency managers.\n\n### Carthage\nCreate a `Cartfile`:\n\n```\ngithub \"izqui/taylor\"\n```\n\nAnd then run:\n\n```sh\n$ carthage update\n$ xcrun swift -F Carthage/Build/Mac yourfile.swift\n```\n\n### CocoaPods Rome\nCreate a `Podfile`:\n\n```\nplatform :osx, '10.10'\n\nplugin 'cocoapods-rome'\n\npod 'Taylor'\n```\n\nAnd then run:\n\n```sh\n$ pod install\n$ xcrun swift -F Rome yourfile.swift\n```\n\nCredits to [Ayaka Nonaka](https://twitter.com/ayanonagon)'s [Swift Summit](http://swiftsummit.com) talk for sharing this method for doing Scripting in Swift\n\n## Dependencies\nRight now Taylor relies on an Swift library called [SwiftSockets](https://github.com/AlwaysRightInstitute/SwiftSockets/).\n\n## Development\nJoin our Slack [![Slack Status](https://taylor-framework.herokuapp.com/badge.svg)](https://taylor-framework.herokuapp.com)\n\nFor the development of the Taylor framework we use Carthage for managing dependencies.\n\nTo contribute to Taylor, clone the project on your local machine and run:\n\n```sh\n$ carthage bootstrap\n```\n\nThen you can open `Taylor.xcodeproj` and start developing.\n\nThe reason there is a Mac app inside the project is for testing purposes given that you cannot have frameworks linked with a Command Line application in Xcode using Carthage. See [here](https://github.com/Carthage/Carthage/issues/287).\n\n## Inspiration\n- [Go's Martini](https://github.com/go-martini/martini)\n- [Barista](https://github.com/SteveStreza/barista)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fizqui%2FTaylor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fizqui%2FTaylor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fizqui%2FTaylor/lists"}