Vapor's command line interface provides shortcuts and assistance for common tasks.
Help prints useful information about available commands and flags.
You can also run the
--help option on any Toolbox command.
vapor new --help
--help flag should be your goto for learning about the toolbox as it is the most up-to-date.
The Toolbox's most important feature is helping you create a new project.
vapor new <name>
Just pass the name of your project as the first argument to the
Project names should be PascalCase →, like
By default, Vapor will create your new project from the API template. You can choose
a different template by passing the
||JSON API with Fluent database.|
||HTML website with Leaf templates.|
There are lots of unofficial Vapor templates on GitHub under the
template topcs →.
You can use these by passing the full GitHub URL to the
Build & Run¶
You can use the toolbox to build and run your Vapor app.
vapor build vapor run
We recommend building and running through Xcode if you have a Mac.
It's a bit faster and you can set breakpoints!
vapor xcode to generate an Xcode project.
The toolbox should be updated by the package manager it was installed with.
brew upgrade vapor
sudo apt-get update sudo apt-get install vapor