Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const http = require('http')
http.createServer((req, res) => {
res.write('<!DOCTYPE html><html><head><title>electron-stream</title><script>')
res.write('console.log("hi");\n')
setTimeout(() => {
res.write('console.log("you");\n')
res.end('</script></head></html>')
}, 3000)
}).listen(8000, () => console.log('8000'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment