app: use location.hostname instead of localhost
wip: add streaming and Server Sent Events instead of WebSockets