Install on macOS¶
To use Vapor on macOS, you will need Swift 5.6 or greater. Swift and all of its dependencies come bundled with Xcode.
Install Xcode from the Mac App Store.
After Xcode has been downloaded, you must open it to complete the installation. This may take a while.
Double check to ensure that the installation was successful by opening the Terminal and printing the Swift's version.
You should see Swift's version information printed.
swift-driver version: 1.75.2 Apple Swift version 5.8 (swiftlang-18.104.22.168.2 clang-1403.0.22.11.100)
Vapor 4 requires Swift 5.6 or greater.
Now that you have Swift installed, let us install the Vapor Toolbox. This CLI tool is not required to use Vapor but it includes helpful utilities like a new project creator.
Toolbox is distributed via Homebrew. If you do not have Homebrew yet, visit brew.sh for install instructions.
brew install vapor
Double check to ensure that the installation was successful by printing help.
You should see a list of available commands.
Now that you have installed Swift and Vapor Toolbox, create your first app in Getting Started → Hello, world.