Gazebo_simulation-Frontend/node_modules/eventsource/example/sse-client.js
2020-12-21 10:29:31 -05:00

6 lines
161 B
JavaScript

var EventSource = require('..')
var es = new EventSource('http://localhost:8080/sse')
es.addEventListener('server-time', function (e) {
console.log(e.data)
})