diff --git a/couscous.yml b/couscous.yml index d2f6dc04..d9bc4a91 100644 --- a/couscous.yml +++ b/couscous.yml @@ -20,12 +20,12 @@ menu: getting-started-install-toolbox: text: Install Toolbox relativeUrl: getting-started/install-toolbox.html - getting-started-manual: - text: Manual - relativeUrl: getting-started/manual.html getting-started-hello-world: text: Hello, World relativeUrl: getting-started/hello-world.html + getting-started-manual: + text: Manual + relativeUrl: getting-started/manual.html getting-started-xcode: text: Xcode relativeUrl: getting-started/xcode.html diff --git a/fluent/driver.md b/fluent/driver.md index ae08d9c0..285b2eea 100644 --- a/fluent/driver.md +++ b/fluent/driver.md @@ -16,7 +16,7 @@ Search GitHub for: - [Fluent Drivers](https://github.com/vapor?utf8=✓&query=-driver) - [Vapor Providers](https://github.com/vapor?utf8=✓&query=-provider) -Not all drivers have providers yet, and not all drivers or providers are up to date with the latest Vapor 0.18. This is a great way to contribute! +Not all drivers have providers yet, and not all drivers or providers are up to date with the latest Vapor 1.0. This is a great way to contribute! ## Creating a Driver diff --git a/getting-started/hello-world.md b/getting-started/hello-world.md index 06f3066c..84ad70dc 100644 --- a/getting-started/hello-world.md +++ b/getting-started/hello-world.md @@ -6,6 +6,8 @@ currentMenu: getting-started-hello-world This section assumes you have installed Swift 3 and the Vapor Toolbox and have verified they are working. +> Note: If you don't want to use the Toolbox, follow the [manual guide](manual.md). + ## New Project Let's start by creating a new project called Hello, World diff --git a/getting-started/install-toolbox.md b/getting-started/install-toolbox.md index acc6317b..f6e2347f 100644 --- a/getting-started/install-toolbox.md +++ b/getting-started/install-toolbox.md @@ -10,7 +10,7 @@ Vapor's command line interface provides shortcuts and assistance for commons tas > If you do not want to install the Toolbox, checkout the [Manual](manual.md) quickstart. -## Install +### Install Run the following script to install the [Toolbox](https://github.com/vapor/toolbox). @@ -20,7 +20,7 @@ curl -sL toolbox.vapor.sh | bash > Note: You must have the correct version of Swift 3 installed. -## Verify +### Verify Make sure the Toolbox installed successfully by running the help query. You should see a print out of the available commands. You can run the `--help` option on any Toolbox command. @@ -28,10 +28,14 @@ Make sure the Toolbox installed successfully by running the help query. You shou vapor --help ``` -## Updating +### Updating The toolbox can update itself. This may be useful if you experience any issues in the future. ```sh vapor self update -``` \ No newline at end of file +``` + +## Create A Project + +Now that you have installed the Toolbox, you can create your first Vapor project following the [Hello, World guide](hello-world.md). \ No newline at end of file diff --git a/getting-started/manual.md b/getting-started/manual.md index 6a16981a..4b89083d 100644 --- a/getting-started/manual.md +++ b/getting-started/manual.md @@ -4,11 +4,13 @@ currentMenu: getting-started-manual # Manual Quickstart -Learn how to create a Vapor project without the Vapor Toolbox using just Swift 3 and the Swift Package Manager. +Learn how to create a Vapor project _without_ the Toolbox using just Swift 3 and the Swift Package Manager. -> If you'd prefer to use the toolbox, learn how to install it [here](install-toolbox.md). +> If you'd prefer to use the Toolbox, learn how to install it [here](install-toolbox.md). -This document assumes that the appropriate version of Swift is installed for Vapor 0.18. +This document assumes that you have Swift 3 installed. + +> Note: If you've installed the Toolbox, follow the toolbox guide [here](hello-world.md). ## Check diff --git a/guide/middleware.md b/guide/middleware.md index 6acbf640..c1e5376f 100644 --- a/guide/middleware.md +++ b/guide/middleware.md @@ -24,10 +24,26 @@ final class VersionMiddleware: Middleware { } ``` -We then add this middleware to our `Droplet`. +We then supply this middleware to our `Droplet`. ```swift -drop.middleware.append(VersionMiddleware()) +let drop = Droplet(availableMiddleware: [ + "version": VersionMiddleware() +]) +``` + +## Middleware.json + +Once the middleware has been supplied, enable it in your `Config/middleware.json` file. + +```json +{ + "server": [ + ... + "version" + ], + ... +} ``` You can imagine our `VersionMiddleware` sitting in the middle of a chain that connects the client and our server. Every request and response that hits our server must go through this chain of middleware.