https://github.com/flowchain/flowchain-sim
The flowchain debug tool
https://github.com/flowchain/flowchain-sim
Last synced: 2 months ago
JSON representation
The flowchain debug tool
- Host: GitHub
- URL: https://github.com/flowchain/flowchain-sim
- Owner: flowchain
- License: mit
- Created: 2018-03-29T13:35:12.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-29T14:02:27.000Z (about 8 years ago)
- Last Synced: 2025-12-28T13:28:45.351Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 150 KB
- Stars: 2
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
The `flowchain-sim` tool.
# Introduction
`flowchain-sim` (Flowchain Simulator) is a simple tool to watch the p2p network of Flowchain IoT nodes.
# Install
```
$ git clone https://github.com/flowchain/flowchain-sim.git
$ cd flowchain-sim
$ npm i
```
# How to Use
1. Please open a terminal and start the debug server:
```
$ export HOST=192.168.124.4
$ export PORT=9009
$ node index.js
WoT/WebSocket server is listening at ws://192.168.124.4:9009
```
The environment variables:
* `HOST`: the listening host
* `PORT`: the listening port
2. After starting the debug server, please modify `dist/index.html` by placing the debug server IP address and port number:
```
var client = new WebSocket( 'ws://192.168.124.4:9009/node/00000000/viewer' );
```
3. Start a web server locally:
```
$ http-server dist/ -p 3000
Starting up http-server, serving dist/
Available on:
http://127.0.0.1:3000
http://192.168.124.4:3000
Hit CTRL-C to stop the server
```
You can install `http-server` by executing `npm i http-server -g`.
4. Open the debug application with your browser by the the url `http://127.0.0.1:3000`.

# License
flowchain-sim is released under the [MIT License](http://www.opensource.org/licenses/MIT). See [LICENSE.md](LICENSE.md).