Zewo is a set of libraries aimed at server side development. With Zewo you can write your web app, REST API, command line tool, database driver, etc. Our goal is to create an ecosystem around the modules and tools we provide so you can focus on developing your application or library, instead of doing everything from scratch.
For a more detailed guide than this README provides, check out our great documentation
Zewo has a few dependencies which the Swift Package cannot set up for you. Nevertheless, it is very simple to install those by yourself.
OS X:
brew tap zewo/tap
brew install zewoLinux:
echo "deb [trusted=yes] http://apt.zewo.io/deb ./" | sudo tee --append /etc/apt/sources.list
sudo apt-get update
sudo apt-get install zewoNow that you've done that, you can simply add Zewo to your Package.swift
import PackageDescription
let package = Package(
dependencies: [
.Package(url: "https://github.com/Zewo/Zewo.git", majorVersion: 0, minor: 2)
]
)One of our core values is modularity. The Zewo package is a convenience umbrella package that imports most of Zewo's packages. If you don't want to bring everything you can cherry pick desired packages at our Zewo organization.
Xcode is Swift's main IDE that provides excellent support for autocomplete, jump-to-definition, and much more. Unfortunately, the Swift Package Manager does not yet have built-in support to generate Xcode projects. As such, we have made a tool called zewo-dev to help us do that.
First, let's configure an Xcode project for you app. Create a directory for Xcode in your app's root directory.
mkdir Xcode && cd XcodeInstall Alcatraz if you haven't already.
curl -fsSL https://raw.github.com/alcatraz/Alcatraz/master/Scripts/install.sh | shLook for Swift Command Line Application under Templates in Alcatraz and install it. Restart Xcode and go to File > New > Projects and choose Swift Command Line Application. Save it on the Xcode directory you just created.
Remove the main.swift file that was generated and add the Sources directory from your app's root directory.
This tool will clone all repos from Zewo and generate Xcode projects for them.
gem install zewo-devInside the Xcode directory create a directory for Zewo's Xcode projects.
mkdir Zewo && cd ZewoPull the repos and generate Xcode projects.
zewodev init && zewodev make_projectsWith your app's Xcode project opened, drag and drop the required Xcode projects from Zewo to your project. In our example we should bring HTTPServer.xcodeproj and Router.xcodeproj.
Go to your app's target Build Phases > Target Dependencies and select HTTPServer and Router frameworks.
Now build and run as usual. After this you can open your favorite browser and go to localhost:8080/hello. You should see hello world again, but now running from Xcode 😎.
Join us on Slack!
Zewo is released under the MIT license. See LICENSE for details.
