# frontnode

> A nodejs based extendable webserver with a reverse proxy, load balancer and caching

Latest version **0.1.0** (published 2016-03-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install frontnode
pnpm add frontnode
yarn add frontnode
bun add frontnode
```

## 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.1.0 |
| Published | 2016-03-13 |
| First published | 2016-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Anunay Inuganti |
| Maintainers | anunay.igi |
| Keywords | webserver, reverse, proxy, load, balancer, caching, nodejs, server |

## Links

- npm: https://www.npmjs.com/package/frontnode
- npm.io page: https://npm.io/package/frontnode

## Dependencies (3)

- [express](https://npm.io/package/express.md) ^4.13.4
- [body-parser](https://npm.io/package/body-parser.md) ^1.15.0
- [express-http-proxy](https://npm.io/package/express-http-proxy.md) ^0.6.0

## Recent versions

- 0.1.0 (latest) — 2016-03-13
- 0.0.1 — 2016-03-06

## README

# Frontnode
A nodejs based extendable webserver with a reverse proxy, load balancer and caching

Frontnode is an easy to setup webserver, you can configure routes, nodes and callbacks to control
the requests and handle them appropriately.

## Installing and Runing the server
1. clone/download this repository.
2. make sure you have node and npm installed.
3. run <code>npm install</code> to download required packages.
4. Rename/Copy config.json.sample to config.json and setup your routing rules.
5. <code>node server.js</code> to run the server.

## Reverse Proxy
Reverse proxies are used to serve different applications running on different ports/domains on a single domain.
Read more about reverse proxies [here](https://en.wikipedia.org/wiki/Reverse_proxy).
Below is an example config.json file
```json
{
  "sourcePort": 80,
  "routes": [
    {
      "route": "/users",
      "target": "http://178.23.45.120:8090"
    },
    {
      "route": "/id",
      "target": "http://117.92.181.212:8010"
    }
  ]
}
```
#### Options

- **sourcePort** - The port that the webserver will listen on.
- **routes** - An array of all your routes.
- **route** - The route that needs to handled.
- **target** - The node where an application is running. The resolved url would be target + route: http://178.23.45.120:8090/users*. During loadbalancing this would be an array of hosts.

## Load balancer
WIP

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