source:
trip-planner-front/node_modules/eventsource/example/sse-client.js@
84d0fbb
Last change on this file since 84d0fbb was 6a3a178, checked in by , 3 years ago | |
---|---|
|
|
File size: 161 bytes |
Rev | Line | |
---|---|---|
[6a3a178] | 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 | }) |
Note:
See TracBrowser
for help on using the repository browser.