# @chialab/rna-dev-server

> A webapp server based on Web Dev Server.

Latest version **0.19.0** (published 2026-08-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @chialab/rna-dev-server
pnpm add @chialab/rna-dev-server
yarn add @chialab/rna-dev-server
bun add @chialab/rna-dev-server
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.19.0 |
| Published | 2026-08-07 |
| First published | 2021-05-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 5 |
| Unpacked size | 50.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 183 |
| Author | Chialab |
| Maintainers | chialab-admin, chialab-developers |
| Keywords | dev-server, webapp, browser, esm, livereload, hmr |

## Links

- npm: https://www.npmjs.com/package/@chialab/rna-dev-server
- Repository: https://github.com/chialab/rna
- Homepage: https://github.com/chialab/rna#readme
- Issues: https://github.com/chialab/rna/issues
- npm.io page: https://npm.io/package/@chialab/rna-dev-server

## Dependencies (5)

- [@chialab/es-dev-server](https://npm.io/package/@chialab/es-dev-server.md) ^0.19.2
- [@chialab/wds-plugin-hmr](https://npm.io/package/@chialab/wds-plugin-hmr.md) ^0.19.1
- [@chialab/wds-plugin-rna](https://npm.io/package/@chialab/wds-plugin-rna.md) ^0.19.2
- [@chialab/rna-config-loader](https://npm.io/package/@chialab/rna-config-loader.md) ^0.19.1
- [@chialab/wds-plugin-node-resolve](https://npm.io/package/@chialab/wds-plugin-node-resolve.md) ^0.19.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.19.0 (latest) — 2026-08-07
- 1.0.0-beta.1 (beta) — 2024-07-09
- 0.18.0-alpha.1 (alpha) — 2023-08-29
- 1.0.2 — 2026-06-23
- 1.0.1 — 2026-02-25
- 1.0.0-beta.0 — 2024-03-11
- 0.18.0 — 2024-01-11
- 0.18.0-alpha.0 — 2023-05-01
- 1.0.0-alpha.0 — 2023-05-01
- 0.17.6 — 2022-10-05
- 0.17.5 — 2022-08-25
- 0.17.4 — 2022-08-25
- 0.17.3 — 2022-08-25
- 0.17.2 — 2022-08-25
- 0.17.1 — 2022-08-23
- … 160 more at https://npm.io/package/@chialab/rna-dev-server/versions

## README

# RNA Dev Server

A webapp server based on [Web Dev Server](https://modern-web.dev/docs/dev-server/overview/).

> [!CAUTION]
> RNA cli development is deprecated and discontinued. It's recommended to use RNA plugins directly in your projects using vite, esbuild, or other supported tools.

[![NPM](https://img.shields.io/npm/v/@chialab/rna-dev-server.svg)](https://www.npmjs.com/package/@chialab/rna-dev-server)

## Install

```sh
npm i @chialab/rna-dev-server -D
```

```sh
yarn add @chialab/rna-dev-server -D
```

```sh
pnpm add @chialab/rna-dev-server -D
```

## Usage

Start a [web dev server](https://modern-web.dev/docs/dev-server/overview/) that transforms ESM imports for node resolution on demand. It also uses [`esbuild`](https://esbuild.github.io/) to compile non standard JavaScript syntax.

### Via import

```js
import { serve } from '@chialab/rna';

/**
 * @see https://modern-web.dev/docs/dev-server/cli-and-configuration/
 */
await serve({
    // rootDir: '.',
});
```

### Via cli

```
rna serve [options] [root]

Options:
  -P, --port <number>  server port number
  -C, --config <path>  the rna config file
  -h, --help           display help for command
```

**Samples**

```sh
rna serve
```

```sh
rna serve public --port 3000
```

### As middleware

```js
import { createServer } from 'http';
import { createDevServer, loadDevServerConfig } from '@chialab/rna-dev-server';
import express from 'express';

const app = express();
const server = createServer(app);
const config = await loadDevServerConfig({
    rootDir: 'src',
});
const devServer = await createDevServer(config);
await devServer.start(server);
app.use(devServer.callback());
```

### Integrations

- [RNA CakePHP](https://github.com/chialab/rna-cakephp): a view helper to inject scripts and css with livereload.

## License

**RNA Dev Server** is released under the [MIT](https://github.com/chialab/rna/blob/main/packages/rna-dev-server/LICENSE) license.

---
_Source: https://npm.io/package/@chialab/rna-dev-server · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
