2022-10-06 09:15:30 +00:00
---
title: "nuxi generate"
description: Pre-renders every route of the application and stores the result in plain HTML files.
---
2022-04-20 17:54:40 +00:00
# `nuxi generate`
```{bash}
2023-01-09 09:25:24 +00:00
npx nuxi generate [rootDir] [--dotenv]
2022-04-20 17:54:40 +00:00
```
The `generate` command pre-renders every route of your application and stores the result in plain HTML files that you can deploy on any static hosting services. The command triggers the `nuxi build` command with the `prerender` argument set to `true`
Option | Default | Description
-------------------------|-----------------|------------------
`rootDir` | `.` | The root directory of the application to generate
2023-01-09 09:25:24 +00:00
`--dotenv` | `.` | Point to another `.env` file to load, **relative** to the root directory.
2023-08-03 16:04:30 +00:00
::alert{type=info}
2023-08-13 21:35:33 +00:00
Read more about [pre-rendering and static hosting ](/docs/getting-started/deployment#static-hosting ).
2023-08-03 16:04:30 +00:00
::