# Deploy a static website

import { PackageManagers } from 'starlight-package-managers';

## Pre-requisites

You must have [Node.js](https://nodejs.org) installed.  
Minimum supported version is 20.x, but using the latest stable version is recommended.  

You can also use [LikeC4 Docker](/tooling/docker/).

## Build

Run `build` command, that prepares a folder with static files ready to be deployed to any host.

```sh
npx likec4 build -o ./dist
```

Available options:

| Option                  | Description                                                                                           |
| ----------------------- | ----------------------------------------------------------------------------------------------------- |
| `-o, --output`          | Output directory                                                                                      |
| `--base`                | Base URL the app is being served from, e.g. "/", "/pages/" or "./" for a relocatable app              |
| `--use-hash-history`    | Hash-based navigation, e.g. "/#/view" instead of "/view"                                              |
| `--use-dot`             | Use local binaries of Graphviz ("dot") instead of bundled WASM                                        |
| `--title`               | Base title of the app pages (default is "LikeC4")                                                     |
| `--output-single-file`  | Generates a single self-contained HTML file                                                           |

To see all available options run:
```sh
npx likec4 build -h
```


## Deploy

LikeC4 CLI uses Vite to build the website.  

All the examples from [Vite documentation](https://vitejs.dev/guide/static-deploy.html) apply to LikeC4, just replace `vite build` with `likec4 build`.