# http-server-fallback

> A simple zero-configuration command-line http server with fallback support

Latest version **0.8.5** (published 2015-11-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install http-server-fallback
pnpm add http-server-fallback
yarn add http-server-fallback
bun add http-server-fallback
```

Provides the commands `hs`, `http-server`.

## 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.8.5 |
| Published | 2015-11-04 |
| First published | 2015-11-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | riceboyler |
| Keywords | cli, command |

## Links

- npm: https://www.npmjs.com/package/http-server-fallback
- Repository: https://github.com/riceboyler/http-server
- Homepage: https://github.com/riceboyler/http-server#readme
- Issues: https://github.com/nodeapps/http-server/issues
- npm.io page: https://npm.io/package/http-server-fallback

## Dependencies (8)

- [union](https://npm.io/package/union.md) ~0.4.3
- [colors](https://npm.io/package/colors.md) 1.0.3
- [corser](https://npm.io/package/corser.md) ~2.0.0
- [opener](https://npm.io/package/opener.md) ~1.4.0
- [ecstatic](https://npm.io/package/ecstatic.md) ~0.7.0
- [optimist](https://npm.io/package/optimist.md) 0.6.x
- [http-proxy](https://npm.io/package/http-proxy.md) ^1.8.1
- [portfinder](https://npm.io/package/portfinder.md) 0.4.x

## 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.8.5 (latest) — 2015-11-04

## README

# http-server: a command-line http server

`http-server` is a simple, zero-configuration command-line http server.  It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development, and learning.

![](https://github.com/nodeapps/http-server/raw/master/screenshots/public.png)

# Installing globally:

Installation via `npm`:

     npm install http-server -g

This will install `http-server` globally so that it may be run from the command line.

## Usage:

     http-server [path] [options]

`[path]` defaults to `./public` if the folder exists, and `./` otherwise.

# Installing as a node app

     mkdir myapp
     cd myapp/
     jitsu install http-server

*If you do not have `jitsu` installed you can install it via `npm install jitsu -g`*

## Usage

### Starting http-server locally

     node bin/http-server

*Now you can visit http://localhost:8080 to view your server*

### Deploy http-server to nodejitsu

     jitsu deploy

*You will now be prompted for a `subdomain` to deploy your application on*

## Available Options:

`-p` Port to use (defaults to 8080)

`-a` Address to use (defaults to 0.0.0.0)

`-d` Show directory listings (defaults to 'True')

`-i` Display autoIndex (defaults to 'True')

`-e` or `--ext` Default file extension if none supplied (defaults to 'html')

`-s` or `--silent` Suppress log messages from output

`--cors` Enable CORS via the `Access-Control-Allow-Origin` header

`-o` Open browser window after starting the server

`-c` Set cache time (in seconds) for cache-control max-age header, e.g. -c10 for 10 seconds (defaults to '3600'). To disable caching, use -c-1.

`-U` or `--utc` Use UTC time format in log messages.

`-P` or `--proxy` Proxies all requests which can't be resolved locally to the given url. e.g.: -P http://someurl.com

`-S` or `--ssl` Enable https.

`-C` or `--cert` Path to ssl cert file (default: cert.pem).

`-K` or `--key` Path to ssl key file (default: key.pem).

`-r` or `--robots` Provide a /robots.txt (whose content defaults to 'User-agent: *\nDisallow: /')

`-f` or `--fallback` Provide a fallback url if response returns 404 - useful for SPA frameworks

`-h` or `--help` Print this list and exit.

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