Before we start creating Vapor applications using the Vapor toolbox, which is an awesome tool provided by the Vapor team, let's see the minimal amount of code needed to create a Vapor application from scratch using the Vapor package. To do so, we need to follow the following steps:
- Create a new Hello folder and open it in the Terminal.
- Then, initialize the Swift package by running the init command, and make it an executable type. This should generate the Sources folder and Test folder, and also create a Package.swift file:
$ swift package init --type executable
- Update the dependencies section in Package.swift to include Vapor as a dependency, and also include Vapor in the target dependency for the Hello target:
let package = Package(
name: "Hello",
dependencies: [
.package(url: "https://github.com/vapor...