# angular-html5-proxy

> Simple express proxy middleware for angular html5mode

Latest version **1.0.2** (published 2015-05-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install angular-html5-proxy
pnpm add angular-html5-proxy
yarn add angular-html5-proxy
bun add angular-html5-proxy
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-05-02 |
| First published | 2015-04-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Song Seung Geun |
| Maintainers | giff |
| Keywords | angular, angularjs, html5mode, express |

## Links

- npm: https://www.npmjs.com/package/angular-html5-proxy
- Repository: https://github.com/gifff/angular-html5-proxy
- Issues: https://github.com/gifff/angular-html5-proxy/issues
- npm.io page: https://npm.io/package/angular-html5-proxy

## Dependencies (3)

- [bluebird](https://npm.io/package/bluebird.md) ^2.9.24
- [http-proxy](https://npm.io/package/http-proxy.md) ^1.10.1
- [connect-modrewrite](https://npm.io/package/connect-modrewrite.md) ^0.7.11

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2015-05-02
- 1.0.1 — 2015-05-02
- 1.0.0 — 2015-05-02
- 0.1.2 — 2015-04-07
- 0.1.1 — 2015-04-06
- 0.1.0 — 2015-04-05

## README

# angular-html5-proxy

  Simple express proxy middleware for angular html5mode

  [![NPM Version][npm-image]][npm-url]
  [![Build Status][travis-image]][travis-url]

```js
var express = require('express'),
    proxy = require('angular-html5-proxy');

app.use(proxy({
  target: 'http://my-angular.static-server.com',
  extensions: ['mp3']
}));

app.listen(3000);
```

## What is this?

  From the angular docs about html5mode

  > #### Server side 
  > 
  > Using this mode requires URL rewriting on server side,
  > basically you have to rewrite all your links to entry point of your application (e.g. index.html).
  
  This is the server side! angular-html-proxy rewrites url of each request and sends it to the original static server.

## Installation

```bash
$ npm install angular-html5-proxy
```

## Options

### target

  Type: `String`

  Proxy target URL. Must contain protocol(ex. http://)

### extensions

  Type: `Array`

  Additional file extensions to serve. Followings are default extensions:
  
  - html
  - js
  - svg
  - css
  - png
  - jpg
  - eot
  - ttf
  - woff
  - woff2
  
## Example

  Here is a simple server implemetation using angular-html5-proxy:
  [angular-simple-server](https://github.com/gifff/angular-simple-server)

## Tests

  To run the test suite, first install the dependencies, then run `npm test`:

```bash
$ npm install
$ npm test
```

## License

  [MIT](LICENSE)
  
[npm-image]: https://img.shields.io/npm/v/angular-html5-proxy.svg
[npm-url]: https://npmjs.org/package/angular-html5-proxy
[travis-image]: https://travis-ci.org/gifff/angular-html5-proxy.svg?branch=master
[travis-url]: https://travis-ci.org/gifff/angular-html5-proxy

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