This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// [the entire purpose of this exercise is to make a post request that will emit an event that takes in an id that should match up with one of the connected socket clients | |
// if we get this process right it will not only help with our payment work thats being worked on but any future dashboard realtime updates for stats] | |
// step processes work as follows with no auth considered in this code | |
// 1) make a post request with a unique identifier attached to it | |
// 2) if there exists a client with said matching unique identifier thats currently open accept that message from the server | |
// 3) we can choose in this case to then close the connection for that client | |
// ** lets assume this is what would done for the payment | |
// [feed back will be much appreciated] | |
'use strict'; | |
import { v4 as uuidv4 } from "uuid"; |
NewerOlder