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.
npx ray-proxy
...or install it into a project:
npm install ray-proxy --save-dev
./node_modules/.bin/ray-proxy
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.
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,
}
# 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
This package uses jest for unit tests. To run the test suite, run:
npm run test
Please see CHANGELOG for more information on what has changed recently.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.