Depends on what kind of information, what method of comms, etc.
If you want asynchronous information transmission and you're using socket.io, you can use the emit() function. See this. Otherwise, if you're looking for more of a synchronous method of info transmission, you can make an HTTP GET request with XMLHttpRequest and return the info when the server gets that request.
Ask || Server To Index
Ok So I want to send info from my server file to my index file (
views/index.ejs
) how do i do this btw i am useing socket.io allreadyDepends on what kind of information, what method of comms, etc.
If you want asynchronous information transmission and you're using socket.io, you can use the emit() function. See this. Otherwise, if you're looking for more of a synchronous method of info transmission, you can make an HTTP GET request with XMLHttpRequest and return the info when the server gets that request.
@SixBeeps This Dont Work
index.ejs
server.js