ray-proxy

0.4.0 • Public • Published

ray-proxy

ray-proxy

npm version npm downloads license test status

ray-proxy


This project acts as a proxy in front of Ray for debugging the data sent between your app and the Ray app.

Internally, this project uses the fastify package for the http service and the axios package to forward the incoming requests to Ray.

By default, the proxy will run on port 23517 and forward the requests to localhost on port 23516.

This is a work in progress and may change considerably without notice.


screenshot


Installation

npx ray-proxy

...or install it into a project:

npm install ray-proxy --save-dev

./node_modules/.bin/ray-proxy

Precompiled Standalone Build

You can find a precompiled, standalone build on the releases page under "Assets", named something like ray-proxy-standalone-X.Y.Z.tgz where X.Y.Z is the latest release version.

All you need to run the standalone build is a NodeJS v12+ installation.

Configuration

Upon starting, ray-proxy looks for the file ray-proxy.config.js in the same directory as your current project's root directory.

This is optional and the application will use the default settings if no configuration file is found.

Example:

// ray-proxy.config.js

module.exports = {
    hostName: 'localhost',
    hostPort: 23516,
    proxyPort: 23517,
    displayBanner: true,
}

Development Instructions

# install required packages
npm install

# run in development mode
npm run dev

# or run in production mode:
npm run prod

Or you can build and run manually:

npm run build:prod # or build:dev

node run dist/ray-proxy.js

Testing

This package uses jest for unit tests. To run the test suite, run:

npm run test


Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Dependencies (3)

Dev Dependencies (12)

Package Sidebar

Install

npm i ray-proxy

Weekly Downloads

0

Version

0.4.0

License

MIT

Unpacked Size

25.2 kB

Total Files

6

Last publish

Collaborators

  • patinthehat