# @adobe/helix-universal-devserver

> Helic Universal Development Server

Latest version **1.2.0** (published 2026-11-15) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @adobe/helix-universal-devserver
pnpm add @adobe/helix-universal-devserver
yarn add @adobe/helix-universal-devserver
bun add @adobe/helix-universal-devserver
```

## Health

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

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

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2026-11-15 |
| First published | 2024-01-30 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 86.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3 |
| Maintainers | marbec, tripod, garthdb, lazd, adobe-admin, patrickfulton, trieloff, krisnye, dcpfsdk, natebaldwin, devongovett, aspro83, symanovi, dpfister, stefan-guggisberg, rofe, kptdobe, adobehalls, fullcolorcoder, djaeggi, dylandepass, mhaack, amol-anand, stopp-adobe, namarora, doten, duh_schmidt, asthabh23, aljoseph, zdahbi, tuicu, fmeschbe |

## Links

- npm: https://www.npmjs.com/package/@adobe/helix-universal-devserver
- Repository: https://github.com/adobe/helix-universal-devserver
- Homepage: https://github.com/adobe/helix-universal-devserver#readme
- Issues: https://github.com/adobe/helix-universal-devserver/issues
- npm.io page: https://npm.io/package/@adobe/helix-universal-devserver

## Dependencies (4)

- [express](https://npm.io/package/express.md) 5.3.0
- [fs-extra](https://npm.io/package/fs-extra.md) 11.4.1
- [@adobe/helix-deploy](https://npm.io/package/@adobe/helix-deploy.md) ^14.0.0
- [@adobe/helix-universal](https://npm.io/package/@adobe/helix-universal.md) ^5.1.0

## Recent versions

- 1.2.0 (latest) — 2026-11-15
- 1.1.152 — 2026-10-27
- 1.1.151 — 2026-10-13
- 1.1.150 — 2026-08-10
- 1.1.149 — 2026-07-27
- 1.1.148 — 2026-05-25
- 1.1.147 — 2026-04-15
- 1.1.146 — 2026-03-23
- 1.1.145 — 2026-01-05
- 1.1.144 — 2025-12-16
- 1.1.143 — 2025-11-29
- 1.1.142 — 2025-11-28
- 1.1.141 — 2025-09-29
- 1.1.140 — 2025-09-16
- 1.1.139 — 2025-09-11
- … 143 more at https://npm.io/package/@adobe/helix-universal-devserver/versions

## README

# Helic Universal Development Server

> Development server for local development of helix universal functions

## Status
[![codecov](https://img.shields.io/codecov/c/github/adobe/helix-universal-devserver.svg)](https://codecov.io/gh/adobe/helix-universal-devserver)
[![GitHub Actions](https://img.shields.io/github/actions/workflow/status/adobe/helix-universal-devserver/main.yaml)](https://github.com/adobe/helix-universal-devserver/actions/workflows/main.yaml)
[![GitHub license](https://img.shields.io/github/license/adobe/helix-universal-devserver.svg)](https://github.com/adobe/helix-universal-devserver/blob/master/LICENSE.txt)
[![GitHub issues](https://img.shields.io/github/issues/adobe/helix-universal-devserver.svg)](https://github.com/adobe/helix-universal-devserver/issues)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

## Installation

```bash
$ npm install @adobe/helix-universal-devserver
```

## Usage

```
// test/dev.js

import { DevelopmentServer } from '@adobe/helix-universal-devserver';
import { main } from '../src/index.js';

async function run() {
 const devServer = await new DevelopmentServer(main).init();
 await devServer.start();
}

run().then(process.stdout).catch(process.stderr);
```

### Optional TCP host binding

Use the chainable `withHost(host)` method to select an explicit TCP hostname or
IP address. For example, bind only to IPv4 loopback on an ephemeral port:

```js
const devServer = await new DevelopmentServer(main)
  .withPort(0)
  .withHost('127.0.0.1')
  .init();
await devServer.start();
```

The assigned port is available as `devServer.port`. Omitting `withHost` preserves
the existing port/callback listen behavior and defaults. An explicit host must
be a non-empty, non-whitespace string; invalid values throw a `TypeError` before
listening rather than falling back to an unspecified bind address. Normal
startup errors and `stop()` behavior are unchanged.

The advertised localhost URL and `x-forwarded-host` header do not select the
TCP bind address.

### Test Helix Deploy Bundle

sometimes it is useful to test a bundled universal function directly, for example to verify that
all imports are properly resolved. This can be achieved by setting the `adapter`, either to
`lambda` or `lambda.raw`. the later bypasses loading of the secrets.

```js
import { lambda } from '../../dist/helix-services/simple-function@2.4.44-bundle.cjs';

async function run() {
  const devServer = await new DevelopmentServer()
    .withHeader('x-forwarded-host', 'localhost:{port}')
    .withAdapter(lambda.raw) // use raw adapter and don't load secrets
    .init();
  await devServer.start();
}
```

### Using development params with the server

Sometimes it might be useful to specify action params that would be provided during deployment
but are not available during development. Those can be specified using the `hlx` configuration
in your `package.json`. The development server will load parameters from:

1. `hlx.package.params-file` and `hlx.package.params`
2. `hlx.params-file` and `hlx.params`
3. `hlx.dev.params-file` and `hlx.dev.params` (overrides the above)

Example using `hlx` (recommended):

```json5
{
  // ...
  "hlx": {
    "name": "my-action@${version}",
    "params-file": [
      "secrets.env"
    ],
    "params": {
      "MY_PARAM": "value"
    },
    "package": {
      "params-file": [
        "package-secrets.env"
      ],
      "params": {
        "PACKAGE_PARAM": "package-value"
      }
    },
    "dev": {
      "params-file": [
        ".dev-secrets.env"
      ],
      "params": {
        "DEV_PARAM": "dev-value"
      }
    }
  }
  // ...
}
```

**Note:** The deprecated `wsk` configuration key is still supported for backwards compatibility,
but `hlx` is now the recommended standard. If both are present, `hlx` takes precedence.
See the [helix-deploy documentation](https://github.com/adobe/helix-deploy?tab=readme-ov-file#specifying-arguments-in-the-packagejson) for more details.

## Development

### Build

```bash
$ npm install
```

### Test

```bash
$ npm test
```

### Lint

```bash
$ npm run lint
```

---
_Source: https://npm.io/package/@adobe/helix-universal-devserver · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
