# express-serve

> A simple command-line http server for static files and API proxy

Latest version **0.0.3** (published 2019-01-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install express-serve
pnpm add express-serve
yarn add express-serve
bun add express-serve
```

Provides the command `express-serve`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2019-01-28 |
| First published | 2019-01-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Cubik Labs |
| Maintainers | cubikio |
| Keywords | cli, command, static, proxy |

## Links

- npm: https://www.npmjs.com/package/express-serve
- Repository: https://gitlab.com/cubikio/express-serve
- Homepage: https://gitlab.com/cubikio/express-serve#readme
- Issues: https://gitlab.com/cubikio/express-serve/issues
- npm.io page: https://npm.io/package/express-serve

## Dependencies (5)

- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [express](https://npm.io/package/express.md) ^4.16.4
- [commander](https://npm.io/package/commander.md) ^2.19.0
- [http-proxy](https://npm.io/package/http-proxy.md) ^1.17.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2019-01-28
- 0.0.2 — 2019-01-21
- 0.0.1 — 2019-01-21

## README

# Express Serve

_A simple command-line tool to serve static content and proxy APIs._

This module has been heavily influenced by [http-server](https://github.com/indexzero/http-server).

# Usage 

```sh
Usage: express-serve [--static | --proxy] <options>

Options:
  -V, --version                   output the version number
  -p, --port <int>                Port to use 			 (default: 8080)
  -s, --ssl [bool]                Enable https 			 (default: false)
  -c, --cert <string>             Path to ssl cert file 	 (default: "cert.pem")
  -k, --key <string>              Path to ssl key file 		 (default: "key.pem")
  -S, --static [bool]             Serve static files 		 (default: false)
  -d, --static.dir <string>       Relative directory 		 (default: "public")
  -g, --static.path <s>           static express style path 	 (default: "/")
  -f, --static.fallback <string>  Fallback page 		 (default: "404.html")
  -x, --static.options <json>     express.static options 	 (default: {})
  -P, --proxy [bool]              Proxy requests 		 (default: false)
  -u, --proxy.url <s>             proxy url 			 (default: "http://localhost:3000")
  -q, --proxy.path <s>            proxy express style path 	 (default: "/api/*")
  -y, --proxy.options <json>      http-proxy options 		 (default: {})
  -h, --help                      output usage information
```
- `--static.options` can be found at [serve-static](https://github.com/expressjs/serve-static#options).
- `--proxy.options` can be found at [http-proxy](https://github.com/nodejitsu/node-http-proxy/blob/master/lib/http-proxy.js#L22-L50).

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