Skip to content

Commit 5e2ab85

Browse files
committed
Rename /sse to /realtime
1 parent 44475f7 commit 5e2ab85

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ The example below shows how you can listen for events in the browser, just swap
9494
micro-analytics.now.sh with your own domain and give it a try.
9595

9696
```es6
97-
const sse = new EventSource('https://micro-analytics.now.sh/sse')
97+
const sse = new EventSource('https://micro-analytics.now.sh/realtime')
9898
sse.onopen = function () { console.log('[sse] open') }
9999
sse.onerror = function (error) { console.error('[sse error]', error) }
100100
sse.addEventListener('micro-analytics-ping', function (e) { console.log('[sse]', e) })

src/handler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if (db.hasFeature("subscribe")) {
1616
module.exports = async function (req, res) {
1717
const { pathname, query } = url.parse(req.url, /* parseQueryString */ true)
1818

19-
if (pathname === '/sse') {
19+
if (pathname === '/realtime') {
2020
if (sse) {
2121
sse.addClient(req, res);
2222
} else {

0 commit comments

Comments
 (0)