Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 647 Bytes

README.md

File metadata and controls

35 lines (27 loc) · 647 Bytes

Example for testing NodeJS performance.

1. ws-server
A websocket server example.
Switch USE_CLUSTER_MODE and USE_ASYNC in the constants.js file to enable cluster and async mode.

USE_CLUSTER_MODE: 0
USE_ASYNC: 0

$ cd ws-server
$ npm install
$ node main.js

If you want to test separately with standalone & cluster modes you can use the following commands:

// Start in standalone mode
$ node node.js
// Start in cluster mode
$ node cluster.js

2. ws-client
A websocket client example.

$ cd ws-client
$ npm install
$ node main.js