fast-gateway
Version:
A Node.js API Gateway for the masses!
49 lines (42 loc) ⢠1.9 kB
Markdown
# Introduction
[](https://github.com/BackendStack21/fast-gateway/actions/workflows/tests.yaml)
[](https://www.npmjs.com/package/fast-gateway)
[](https://www.npmjs.com/package/fast-gateway)
[](https://www.npmjs.com/package/fast-gateway)
[](https://www.npmjs.com/package/fast-gateway)
[](https://github.com/jkyberneees/fast-gateway)
<img src="docs/fast-gateway-logo.svg" width="400">
A super fast, framework agnostic Node.js API Gateway for the masses â€ïž
*Docker images: https://hub.docker.com/repository/docker/kyberneees/rproxy*
> Since v2.3.0, [AWS Lambda](https://www.youtube.com/watch?v=EBSdyoO3goc) proxying integration is supported via [`http-lambda-proxy`](https://www.npmjs.com/package/http-lambda-proxy) ð¥
> Since v3.1.0, WebSockets proxying is supported via [`faye-websocket`](https://www.npmjs.com/package/faye-websocket) ð¥
Read more online:
- A â.jsâ API Gateway for the masses: https://itnext.io/a-js-api-gateway-for-the-masses-a12fdb9e961c
## Install
```js
npm i fast-gateway
```
## Usage
### Gateway
```js
const gateway = require('fast-gateway')
const server = gateway({
routes: [{
prefix: '/service',
target: 'http://127.0.0.1:3000'
}]
})
server.start(8080)
```
### Remote Service
```js
const service = require('restana')()
service.get('/get', (req, res) => res.send('Hello World!'))
service.start(3000)
```
### Testing
```bash
curl -v http://127.0.0.1:8080/service/get
```
## More
- Website and documentation: https://fgw.21no.de