Skip to content

Commit

Permalink
docs: convert to underscore preset names (#2592)
Browse files Browse the repository at this point in the history
  • Loading branch information
anbraten authored Jul 7, 2024
1 parent a8234d3 commit 1b8e497
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/1.guide/10.tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default defineNuxtConfig({
### Platform support

- `dev`, `node-server`, `bun` and `deno-server` presets are supported with [croner](https://croner.56k.guru/) engine.
- `cloudflare_module` preset have native integraton with [Cron Triggers](https://developers.cloudflare.com/workers/configuration/cron-triggers/). Make sure to configure wrangler to use exactly same patterns you define in `scheduledTasks` to be matched.
- `cloudflare_module` preset have native integration with [Cron Triggers](https://developers.cloudflare.com/workers/configuration/cron-triggers/). Make sure to configure wrangler to use exactly same patterns you define in `scheduledTasks` to be matched.
- More presets (with native primitives support) are planned to be supported!

## Programmatically run tasks
Expand Down
7 changes: 3 additions & 4 deletions docs/2.deploy/10.runtimes/1.node.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: akar-icons:node-fill

> Run Nitro apps with Node.js runtime.
**Preset:** `node-server`
**Preset:** `node_server`

Node.js is the default nitro output preset for production builds and Nitro has native Node.js runtime support.

Expand Down Expand Up @@ -40,17 +40,16 @@ You can customize server behavior using following environment variables:

## Cluster mode

**Preset:** `node-cluster`
**Preset:** `node_cluster`

For more performance and leveraging multi core handling, you can use cluster preset.

### Environment Variables

In addition to `node-server` environment variables, you can customize behavior:
In addition to environment variables from the `node_server` preset, you can customize behavior:

- `NITRO_CLUSTER_WORKERS`: Number of cluster workers (default is Number of available cpu cores)


## Handler (advanced)

**Preset:** `node`
Expand Down
4 changes: 2 additions & 2 deletions docs/2.deploy/10.runtimes/deno.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ icon: simple-icons:deno

> Run Nitro apps with [Deno](https://deno.com/) runtime.
**Preset:** `deno-server`
**Preset:** `deno_server`

You can build your Nitro server using Node.js to run within [Deno Runtime](https://deno.com/runtime) in a custom server.

```bash
# Build with the deno NITRO preset
NITRO_PRESET=deno-server npm run build
NITRO_PRESET=deno_server npm run build

# Start production server
deno run --unstable --allow-net --allow-read --allow-env .output/server/index.ts
Expand Down
6 changes: 3 additions & 3 deletions docs/2.deploy/20.providers/cloudflare.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ If you use the [Cloudflare Pages GitHub/GitLab integration](https://developers.c

If instead you want preview your application locally and/or manually deploy it, when building the application you will need to let Nitro know that the target environment is the Cloudflare Pages one, you can do that in two ways:

1. By defining either the `NITRO_PRESET` or the `SERVER_PRESET` environment variable set to `cloudflare-pages` when running the build process, like so:
1. By defining either the `NITRO_PRESET` or the `SERVER_PRESET` environment variable set to `cloudflare_pages` when running the build process, like so:

```bash
NITRO_PRESET=cloudflare-pages npm run build
NITRO_PRESET=cloudflare_pages npm run build
```

1. Or by updating your Nitro [preset configuration](/config#preset):

```json5
"preset": "cloudflare-pages",
"preset": "cloudflare_pages",
```

and then running the standard build command:
Expand Down
4 changes: 2 additions & 2 deletions docs/2.deploy/20.providers/digitalocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Deploy Nitro apps to DigitalOcean.
**Preset:** `digital-ocean`
**Preset:** `digital_ocean`

:read-more{title="Digital Ocean App Platform" to="https://docs.digitalocean.com/products/app-platform/"}

Expand All @@ -13,7 +13,7 @@
1. Next, you'll need to configure environment variables. In your app settings, ensure the following app-level environment variables are set:

```bash
NITRO_PRESET=digital-ocean
NITRO_PRESET=digital_ocean
```

[More information](https://docs.digitalocean.com/products/app-platform/how-to/use-environment-variables/).
Expand Down
2 changes: 1 addition & 1 deletion docs/3.config/0.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ icon: ri:settings-3-line

Use `preset` option `NITRO_PRESET` environment variable for custom **production** preset.

Preset for development mode is always `nitro-dev` and default `node-server` for production building a standalone Node.js server.
Preset for development mode is always `nitro_dev` and default `node_server` for production building a standalone Node.js server.

The preset will automatically be detected when the `preset` option is not set and running in known environments.

Expand Down

0 comments on commit 1b8e497

Please sign in to comment.