Notebooks 2.0 is here.
Read the preview announcement
Platform
Resources
Pricing
Sign in
Get started
Chris Thorgrimsson
Workspace
Fork
Published
By
Chris Thorgrimsson
Edited
Sep 28, 2019
Insert cell
md
`# Messing with System Log SSE Events`
Insert cell
import
{
v1
}
from
'@vega/vega-lite-api'
Insert cell
import
{
printTable
}
from
'@uwdata/data-utilities'
Insert cell
onMessage
=
e
=>
{
let
event
=
JSON
.
parse
(
e
.
data
)
;
console
.
log
(
event
.
source
)
;
}
Insert cell
{
let
es
=
new
EventSource
(
'http://localhost:18071/log/v1/system'
)
;
es
.
onmessage
=
onMessage
;
return
es
;
}
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
onMessage
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML