Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions app/pages/docs/cli-build.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,23 @@ sidebar_label: blitz build

**Alias: `blitz b`**

Create a production build of your Blitz app. It compiles your Blitz app
Create a **production build** of your Blitz app. It compiles your Blitz app
into Next.js runtime code inside `.next`

This is a super thin wrapper over Next CLI to improve environment variable
loading.

```bash
blitz dev -e staging
```

It does the following:

1. Loads correct `.env.X` and `.env.X.local` files based on the `-e X`
flag that you specify. Ex: `-e staging` loads `.env.staging`.
2. Sets `process.env.APP_ENV` to the env name. Ex: `-e staging` =>
`APP_ENV=staging`.
3. Passes all other arguments directly to the next build command
1. Loads `.env.production`.
2. Sets `process.env.APP_ENV` to `production`
3. Passes all other arguments directly to the [`next build` command](https://nextjs.org/docs/api-reference/cli#build)

#### Options

| Option | Shorthand | Description | Default |
| ------- | --------- | ------------------------------------------------------------------------------------- | ------- |
| `--env` | `-e` | Set app environment name. [Read more](/docs/custom-environments#custom-environments). | None |
| Option | Shorthand | Description | Default |
| ------------------------ | --------- | ------------------------------------------------------------------------------------- | ------------- |
| `--inspect` | | Enable the Node.js inspector | `false` |

#### Examples

Expand Down
14 changes: 4 additions & 10 deletions app/pages/docs/cli-dev.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,16 @@ sidebar_label: blitz dev

**Alias: `blitz d`**

Starts the Blitz development server.
Starts the Blitz **development** server.

This is a super thin wrapper over Next CLI to improve environment variable
loading.

```bash
blitz dev -e staging
```

It does the following:

1. Loads correct `.env.X` and `.env.X.local` files based on the `-e X`
flag that you specify. Ex: `-e staging` loads `.env.staging`.
2. Sets `process.env.APP_ENV` to the env name. Ex: `-e staging` =>
`APP_ENV=staging`.
3. Passes all other arguments directly to the next build command
1. Loads correct `.env.local`.
2. Sets `process.env.APP_ENV` to the env `dev`.
3. Passes all other arguments directly to the [`next dev` command](https://nextjs.org/docs/api-reference/cli#development)

#### Options

Expand Down
14 changes: 4 additions & 10 deletions app/pages/docs/cli-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,16 @@ sidebar_label: blitz start

**Alias: `blitz s`**

Starts the Blitz production server.
Starts the Blitz **production** server.

This is a super thin wrapper over Next CLI to improve environment variable
loading.

```bash
blitz dev -e staging
```

It does the following:

1. Loads correct `.env.X` and `.env.X.local` files based on the `-e X`
flag that you specify. Ex: `-e staging` loads `.env.staging`.
2. Sets `process.env.APP_ENV` to the env name. Ex: `-e staging` =>
`APP_ENV=staging`.
3. Passes all other arguments directly to the next build command
1. Loads correct `.env.production`.
2. Sets `process.env.APP_ENV` to the env `production`.
3. Passes all other arguments directly to the [`next start` command](https://nextjs.org/docs/api-reference/cli#production)

#### Options

Expand Down