@borealisgroup/proxy-service
v1.0.14
Published
Generic and templated proxy configurations for creating REST API's
Downloads
21
Readme
Templated Proxy Services
This package is a multi purpose proxy service that will let you easily customize what routes, headers and parameters are processed.
Valid requests gets processed according to the templated definitions and return responses, with just a simple yaml declaration file.
Getting started
...
Example Configuration
There is a set of examples included, for you to see how to use the YAML route definitions.
Consider the following simple example, that will proxy requests from http://<your-host>/proxied
to the endpoint http://localhost:$PORT
.
name: proxy-request
destination: http://localhost:$PORT
defaults:
methods: [HEAD, GET]
routes:
'/proxied': '~/api'
Parsing YML files
YML files parsed according to YAML npm package's parse method