Alias: blitz d
Starts the Blitz development server.
This is a super thin wrapper over Next CLI to improve environment variable loading.
blitz dev -e staging
It does the following:
.env.X
and .env.X.local
files based on the -e X
flag that you specify. Ex: -e staging
loads .env.staging
.process.env.APP_ENV
to the env name. Ex: -e staging
=>
APP_ENV=staging
.Option | Shorthand | Description | Default |
---|---|---|---|
--hostname | -H | Set the hostname to use for the server. | "localhost" |
--port | -p | Set the port you'd like the server to listen on. | 3000 |
--no-incremental-build | Disable incremental build and start from a fresh cache | false | |
--inspect | Enable the Node.js inspector | false | |
--env | -e | Set app environment name. Read more. | None |
blitz dev
blitz dev -p 4000