feat(ws): send history data and update data with web socket
Added following logic: 1. New clients receive 15 entry history from history file 2. After that, every 10 seconds when new entry is generated it is sent out to all connected clients
This commit is contained in:
6
backend/consts.js
Normal file
6
backend/consts.js
Normal file
@@ -0,0 +1,6 @@
|
||||
// Define global constants for min and max values
|
||||
export const MAX = 100;
|
||||
export const MIN = 0;
|
||||
|
||||
// Define range for random number generation
|
||||
export const RANGE = 0.3; // +-0.3 -> +-30% of previous number
|
||||
Reference in New Issue
Block a user