mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-21 16:55:57 +00:00
docs: use ini
syntax block highlighting for .env
files
This commit is contained in:
parent
f6bbb8e87c
commit
4885e249ec
@ -83,7 +83,7 @@ export default defineNuxtConfig({
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash [.env]
|
```ini [.env]
|
||||||
# This will override the value of apiSecret
|
# This will override the value of apiSecret
|
||||||
NUXT_API_SECRET=api_secret_token
|
NUXT_API_SECRET=api_secret_token
|
||||||
```
|
```
|
||||||
|
@ -328,7 +328,7 @@ export default defineNuxtConfig({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
```bash [.env]
|
```ini [.env]
|
||||||
NUXT_GITHUB_TOKEN='<my-super-token>'
|
NUXT_GITHUB_TOKEN='<my-super-token>'
|
||||||
```
|
```
|
||||||
::
|
::
|
||||||
|
@ -15,7 +15,7 @@ Nuxt CLI has built-in [dotenv](https://github.com/motdotla/dotenv) support in de
|
|||||||
|
|
||||||
In addition to any process environment variables, if you have a `.env` file in your project root directory, it will be automatically loaded **at dev, build and generate time**. Any environment variables set there will be accessible within your `nuxt.config` file and modules.
|
In addition to any process environment variables, if you have a `.env` file in your project root directory, it will be automatically loaded **at dev, build and generate time**. Any environment variables set there will be accessible within your `nuxt.config` file and modules.
|
||||||
|
|
||||||
```bash [.env]
|
```ini [.env]
|
||||||
MY_ENV_VARIABLE=hello
|
MY_ENV_VARIABLE=hello
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ Watch a video from Alexander Lichter showcasing the top mistake developers make
|
|||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
```sh [.env]
|
```ini [.env]
|
||||||
NUXT_API_SECRET=api_secret_token
|
NUXT_API_SECRET=api_secret_token
|
||||||
NUXT_PUBLIC_API_BASE=https://nuxtjs.org
|
NUXT_PUBLIC_API_BASE=https://nuxtjs.org
|
||||||
```
|
```
|
||||||
|
@ -29,7 +29,7 @@ As `nuxt-auth-utils` uses sealed cookies to store session data, session cookies
|
|||||||
If not set, this environment variable will be added to your `.env` automatically when running in development mode.
|
If not set, this environment variable will be added to your `.env` automatically when running in development mode.
|
||||||
::
|
::
|
||||||
|
|
||||||
```dotenv [.env]
|
```ini [.env]
|
||||||
NUXT_SESSION_PASSWORD=a-random-password-with-at-least-32-characters
|
NUXT_SESSION_PASSWORD=a-random-password-with-at-least-32-characters
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ It is possible to update runtime config values using a matching environment vari
|
|||||||
|
|
||||||
We can set the environment variables inside the `.env` file to make them accessible during **development** and **build/generate**.
|
We can set the environment variables inside the `.env` file to make them accessible during **development** and **build/generate**.
|
||||||
|
|
||||||
``` [.env]
|
```ini [.env]
|
||||||
NUXT_PUBLIC_API_BASE = "https://api.localhost:5555"
|
NUXT_PUBLIC_API_BASE = "https://api.localhost:5555"
|
||||||
NUXT_API_SECRET = "123"
|
NUXT_API_SECRET = "123"
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user