# launch-editor-middleware

> express middleware for launching editor

Latest version **2.14.1** (published 2026-06-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install launch-editor-middleware
pnpm add launch-editor-middleware
yarn add launch-editor-middleware
bun add launch-editor-middleware
```

## Health

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

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

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.14.1 |
| Published | 2026-06-01 |
| First published | 2018-01-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 720 |
| Author | Evan You |
| Maintainers | yyx990803, soda, sapphi-red |
| Keywords | editor, express, middleware |

## Links

- npm: https://www.npmjs.com/package/launch-editor-middleware
- Repository: https://github.com/vitejs/launch-editor
- Homepage: https://github.com/vitejs/launch-editor#readme
- Issues: https://github.com/vitejs/launch-editor/issues
- npm.io page: https://npm.io/package/launch-editor-middleware

## Dependencies (1)

- [launch-editor](https://npm.io/package/launch-editor.md) ^2.14.1

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.14.1 (latest) — 2026-06-01
- 2.14.0 — 2026-05-29
- 2.13.2 — 2026-03-21
- 2.13.1 — 2026-02-25
- 2.13.0 — 2026-02-18
- 2.12.0 — 2025-10-28
- 2.11.1 — 2025-08-07
- 2.11.0 — 2025-07-28
- 2.10.0 — 2025-02-17
- 2.9.1 — 2024-09-05
- 2.9.0 — 2024-09-05
- 2.8.1 — 2024-08-05
- 2.8.0 — 2024-06-19
- 2.7.0 — 2024-06-16
- 2.6.1 — 2023-10-07
- … 9 more at https://npm.io/package/launch-editor-middleware/versions

## README

# launch-editor-middleware

An express/connect/webpack-dev-server compatible middleware for opening files in your editor from the browser, powered by [`launch-editor`](https://github.com/vitejs/launch-editor#readme).

## Usage

```js
const launchMiddleware = require('launch-editor-middleware')

app.use('/__open-in-editor', launchMiddleware())
```

To launch files, send requests to the server like the following:

```text
/__open-in-editor?file=src/main.js:13:24
```

Both the line and column numbers are optional. `file://` URIs are also supported.

## API

See [`index.d.ts`](./index.d.ts) for the full type definitions and the available arguments.

## Custom editor support

This package infers the editor from currently running processes. You can override that behavior with the `LAUNCH_EDITOR` environment variable to force a specific editor or run a custom launch script. See the [`launch-editor` README](https://github.com/vitejs/launch-editor#custom-editor-support) for details.

---
_Source: https://npm.io/package/launch-editor-middleware · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
