> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentfront.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Serve Executor

> Start a supervised production server using frontmcp start

Starts a supervised production server with automatic restart on crashes. Uses the FrontMCP process manager.

## Usage

```bash theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
nx serve my-app
```

## Configuration

```json project.json theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
{
  "targets": {
    "serve": {
      "executor": "@frontmcp/nx:serve",
      "options": {
        "entry": "{projectRoot}/src/main.ts",
        "port": 3000
      }
    }
  }
}
```

## Options

| Option        | Type     | Default | Description                          |
| ------------- | -------- | ------- | ------------------------------------ |
| `entry`       | `string` | —       | Entry file path                      |
| `port`        | `number` | —       | Port to listen on                    |
| `maxRestarts` | `number` | `5`     | Maximum number of automatic restarts |

## Behavior

* **Process supervision**: Automatically restarts on crash (up to `maxRestarts`)
* **Graceful shutdown**: Handles SIGTERM for clean stops
* **Not cacheable**: Long-running process
