0.1.3 • Published 3 years ago
easy-wsapiproxy v0.1.3
📦 easy-wsapiproxy
This package will help you to send requests to web socket using a simple API rest. Useful for development proposes, using this tool you can send socket.io requests from postman or similar tools and get the result
Install
npm install -g easy-wsapiproxy
Usage
Install the npm wsapiproxy
Run the tool
easy-wsapiproxy <api-port>
- Send a post with the following body
{
"url": "http://", // 👉 http or ws
"emitter": "", // 👉 event name
"listeners": [], // 👉 list of listeners
"headers": { // 👉 key, value pair object
"Authorization": "bearer XXXXX.XXXXX.....",
},
"argument": {} // 👉 Object to request
}
- Result structure
{
"response": {
"listener" : "", // 👉 What listener response
"result": {} // 👉 The result from the websocket
},
"_request": {}, // 👉 The request you sent,
}
Contributing
If someone wants to add or improve something, I invite you to collaborate directly in this repository: easy-wsapiproxy
How to run the npm
- Clone the repository.
- Install dependencies.
- Make your changes.
- Run the command
npm run start:dev <api-port>
. - Happy programming
Status
Project: in progress Thank you for using this NPM
Stay in touch
- Author - Luis Arias 2021 <ariassd@gmail.com> GitHub profile
License
This software is licensed under MIT License
May 2021