An open API service indexing awesome lists of open source software.

https://github.com/permafrost-dev/ray-proxy

a proxy for the Ray app to allow debugging of payloads
https://github.com/permafrost-dev/ray-proxy

debugging javascript npm-package proxy ray typescript

Last synced: 3 months ago
JSON representation

a proxy for the Ray app to allow debugging of payloads

Awesome Lists containing this project

README

          


ray-proxy



ray-proxy




npm version npm downloads license test status

# ray-proxy

---

This project acts as a proxy in front of [Ray](https://myray.app) for debugging the data sent between your app and the Ray app.

Internally, this project uses the [fastify](https://www.fastify.io/) package for the http service and the [axios](https://github.com/axios/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](https://static.permafrost.dev/images/ray-proxy/screenshot-01.png)

---

## Installation

```bash
npx ray-proxy
```

...or install it into a project:

```bash
npm install ray-proxy --save-dev

./node_modules/.bin/ray-proxy
```

## Precompiled Standalone Build

You can find a precompiled, standalone build on the [releases](../../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:_

```js
// ray-proxy.config.js

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

---

## Development Instructions

```bash
# 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:

```bash
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](CHANGELOG.md) for more information on what has changed recently.

## Security Vulnerabilities

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

## Credits

- [Patrick Organ](https://github.com/patinthehat)
- [All Contributors](../../contributors)

## License

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