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 allready
views/index.ejs
@GatewayDuckYT you can send info with socketio like this
io.on("connection", (socket) => { socket.emit("greeting", "Hello World"); })
and in the front end do:
socket.on("greeting", (data) => { alert(data) })
use this reference: https://socket.io/docs/v3/emit-cheatsheet/
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 allready@GatewayDuckYT you can send info with socketio like this
and in the front end do:
use this reference:
https://socket.io/docs/v3/emit-cheatsheet/