@saimraza786 why just not to run node js server not in BAS? set 2 endpoint url's, one to push data on server , and second to retrieve data from server to BAS only by GET request?
In the browser, all these scripts are executed automatically, if you work with the site via the http-client, then you will have to execute these scripts manually.