0.1.3 • Published 3 years ago

easy-wsapiproxy v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

npm.io

📦 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

  1. Install the npm wsapiproxy

  2. Run the tool

easy-wsapiproxy <api-port>
  1. 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
}
  1. Result structure
{
  "response": { 
    "listener" : "", // 👉 What listener response
    "result": {} // 👉 The result from the websocket
  }, 
  "_request": {}, // 👉 The request you sent,
}

npm.io

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

License

This software is licensed under MIT License

npm.io npm.io

May 2021

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago