GithubHelp home page GithubHelp logo

cescofry / swifter-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from httpswift/swifter

0.0 2.0 0.0 6.58 MB

Tiny http server engine written in Swift programming language.

License: BSD 3-Clause "New" or "Revised" License

Swift 95.75% HTML 2.09% Ruby 0.82% Objective-C 1.34%

swifter-1's Introduction

What is Swift?

Swift is an innovative new programming language for Cocoa and Cocoa Touch. Writing code is interactive and fun, the syntax is concise yet expressive, and apps run lightning-fast. Swift is ready for your next iOS and OS X project — or for addition into your current app — because Swift code works side-by-side with Objective-C.

What is Swifter?

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)) }
server.start()

How to share files?

let server = HttpServer()
server["/home/(.+)"] = HttpHandlers.directory("~/")
server.start()

How to redirect?

let server = HttpServer()
server["/redirect"] = { request in
  return .MovedPermanently("http://www.google.com")
}
server.start()

CocoaPods? Yes.

pod 'Swifter', '~> 1.0.2’

Carthage? Also yes.

github "glock45/swifter" == 1.0.2

swifter-1's People

Contributors

arcz avatar bygri avatar damian-kolakowski avatar jetforme avatar johnno1962 avatar julien-c avatar lucatorella avatar nickplee avatar palleas avatar pyanfield avatar soutaro avatar tangshi avatar yawaramin avatar ziper1 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.