> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# dev

The `rs dev` command starts the [Rsbuild development server](https://rsbuild.rs/guide/basic/server) for an application. It compiles the source code in development mode, watches for changes, and applies hot module replacement (HMR) or reloads the page as needed.

## Usage

```bash
rs dev [options]
```

The command loads the application configuration registered with [`define.app()`](/guide/configuration.md#define-app).

## Options

`rs dev` supports the same development server options as Rsbuild. See the [Rsbuild CLI documentation](https://rsbuild.rs/guide/basic/cli#rsbuild) for details.

Examples:

```bash
# Start the server and open the page in the browser
rs dev --open

# Use port 8080 and fail if it is already in use
rs dev --port 8080 --strict-port

# Make the server available on the local network
rs dev --host
```

## Configuration

Configure the development server through [`define.app()`](/guide/configuration.md#define-app) in the [Rstack configuration file](/guide/configuration.md#configuration-file). It accepts the standard [Rsbuild configuration](https://rsbuild.rs/config/):

```ts title="rstack.config.ts"
import { define } from 'rstack';

define.app({
  server: {
    open: true,
    port: 8080,
  },
});
```
