Skip to content
Tanner Nelson edited this page Feb 19, 2016 · 15 revisions

Vapor

Vapor

A Laravel/Lumen Inspired Web Framework for Swift that works on iOS, OS X, and Ubuntu.

  • Insanely fast
  • Beautiful syntax
  • Type safe

Roadmap

Check out the Roadmap to see where Vapor is headed.

Contributing

Pull Requests are encouraged and will be reviewed and merged as quickly as possible. Follow GitHub's Swift Style Guide when writing code for Vapor.

Guide

After Getting Started with Vapor, check out all of the great features it offers:

Development

Vapor comes with an included Xcode project that can be used for development. Several files that are useful for development are included in the .gitignore file to ensure the library does not contain extraneous files.

Sources/main.swift

This file is the most vital for development. Without a main.swift file, swift build will compile the source files as a library instead of an executable. For development, you should add a main.swift file to your project that contains all of the routes, middleware, etc that you may need.

  • Resources/*

Files included in the Resources directory can be used by the View class to render templates.

  • Public/*

Files and folders included in the Public directory are available at the root domain Vapor is running at.

Testing

When adding new features to Vapor, it is critical that they come with tests to ensure their continued functionality. To add a test, create a new file in the Tests folder (or add to an existing one if an appropriate file already exists). Use the other tests as templates and follow the standard XCTest conventions.

Choose the Tests scheme (there should be two schemes, Vapor and Tests) and press Command+u to run the unit tests.

Clone this wiki locally