README This page describes the Swift library httpserver and how to use it in your project.
You can use it for your own website, an interactive chat application or any other application you want to deploy in Swift.
To install it, add it to your project: Add this to your Podfile: pod ‘httpserver’, ‘~> 1.0’ This is the version number of the Swift version that you can use.
For example, if you want the latest Swift version 1.1, add this to the Podfile : pod ‘1.1’ This ensures that the latest version of the library is used.
Note that the version of Swift that you use will affect how the HTTP server works.
For more information about Swift versions and Swift, see https://swift.org/versioning.
If you’re new to HTTP server development, see HTTP Server Basics.
If your app depends on http server support, you might want to consider adding httpserver to your application, as it provides a common API for interacting with HTTP server applications.
For further information about http server API, see http-server.
This repository also contains the source code of the httpserver library, which is used by other Swift projects.
You’ll also find information on the various packages that you need to install to use httpserver.
See http-client for a list of packages that are available.
You will need a development environment (either local or remote) to use this library.
To see a list, install the Swift package manager and install the appropriate dependencies: git clone https://github.com/matthewp/httpserver.git cd httpserver make Make sure you have the appropriate versions of the following packages installed: httplib4 httpclient httpliber httplinet6 httplio httplios httpserver The list of installed packages can be found at https://docs.swift-lang.org.
You also need to have a local copy of Swift installed: cd ..
&& cd swift-lang/build-master Make sure that you have Swift installed and running: swift install https://local.swiftygit.com:3000/swift/swim-1.0/swiftsource/swimsources/swifty-1-1/swifttest/swiv-3.0.1-macos-x86_64.swif Then, run swift build-info to compile the project and run make to build and install.
You should be able to access httpserver from a URL in your web browser.
If everything is working as expected, you should see http://localhost:3000.
You might also need a local account to access the Swift website from your local computer.
You may also need the Swift Debugger (http://developer.apple.com/) installed to debug your code.
For details, see Debugging Swift Web Applications.