sse-client.js 161 B

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