Skip to content

Instantly share code, notes, and snippets.

@juliangruber
Created September 28, 2016 09:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliangruber/940f705c1d513828d08f104284a4b034 to your computer and use it in GitHub Desktop.
Save juliangruber/940f705c1d513828d08f104284a4b034 to your computer and use it in GitHub Desktop.
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