Skip to content

mintheinwin/websocket-simulate-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project uses Node.js to simulate WebSocket API requests and generate JSON data in the required format. The simulated data can be easily consumed by any frontend application, whether it is a mobile app or a web application.

How to Run the Project

  1. Clone the repository

  2. Open your Terminal

    Install dependencies

    npm install

    or

    npm install ws

  3. Start the simulation server (This terminal exports the simulated data in JSON format)

    node simulate-server.js


  1. Run the main project (Open another terminal)

    node index.js


  1. Generated Data Output The simulated data will be saved automatically into the file:

    data.json

    WebSocket Endpoint

    You can connect using:

    ws://localhost:8080

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published