-
Notifications
You must be signed in to change notification settings - Fork 511
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
49 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,37 @@ | ||
# Configuration | ||
|
||
Customize your Nitro app with a configuration file. | ||
You can customize your Nitro server with single configuration file: `nitro.config.ts`. | ||
|
||
In order to customize nitro's behavior, we can use `nitro.config.ts`. | ||
All deployment providers are built on the same options API. | ||
|
||
It is powerful enough that all deployment providers are built on the same options API. | ||
|
||
Create a new `nitro.config.ts` file to provide options: | ||
If you are using [Nuxt](https://nuxt.com), use the `nitro` option in your Nuxt config. | ||
|
||
::code-group | ||
```ts [nitro.config.ts] | ||
import { defineNitroConfig } from 'nitropack' | ||
|
||
export default defineNitroConfig({ | ||
// Your options | ||
// Nitro options | ||
}) | ||
``` | ||
```ts [nuxt.config.ts] | ||
export default defineNuxtConfig({ | ||
nitro: { | ||
// Nitro options | ||
} | ||
}) | ||
``` | ||
|
||
::alert | ||
**More Features Available!** | ||
:br | ||
Nitro handles configuration loading using [unjs/c12](https://github.com/unjs/c12). You have more advanced possibilities such as using `.env`. And `.nitrorc`. | ||
:: | ||
|
||
Read all the [available options](/config) to configure Nitro. | ||
|
||
Nitro loads the configuration using [unjs/c12](https://github.com/unjs/c12), giving more possibilities such as using `.nitrorc`. | ||
|
||
::code-group | ||
```txt [.nitrorc] | ||
timing=true | ||
``` | ||
```txt [.nuxtrc] | ||
nitro.timing=true | ||
``` | ||
:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters