TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Browserver: a node.js HTTP server, in your browser

308 pointsby jedschmidtalmost 13 years ago

21 comments

arturadibalmost 13 years ago
TL;DR: This is a proxy server that routes HTTP requests from a unique subdomain (e.g. <a href="http://m7rp3u2ntr9t3xr.browserver.org" rel="nofollow">http://m7rp3u2ntr9t3xr.browserver.org</a>) to a browser that's visiting browserver.org. The JavaScript in the browser then handles the HTTP response. This is possible thanks to a persistent connection between the browser and browserver.org, via some "websocket-like" protocol.<p>The title "node.js HTTP server, in your browser" is because the HTTP handler in the client (browser) has a Node-like API, see:<p><a href="https://github.com/jed/browserver-client#example" rel="nofollow">https://github.com/jed/browserver-client#example</a>
评论 #4367331 未加载
评论 #4367770 未加载
jedschmidtalmost 13 years ago
Hey all,<p>I put browserver together in my free time over the last week. It's still a bit of a toy, but I think it's useful to explore ideas around extending webhooks all the way to the browser, to simplify our increasingly complicated web architectures.<p>It's already late here in Tokyo, but I'll be up for a bit if anyone wants to chat/brainstorm about approaches like this (and also to make sure the server stays up).
评论 #4366691 未加载
评论 #4366683 未加载
评论 #4370035 未加载
评论 #4367325 未加载
评论 #4368129 未加载
评论 #4366671 未加载
评论 #4366997 未加载
ericzalmost 13 years ago
I find this title rather misleading. There is no node.js HTTP server in your browser. Meaning, you cannot do anything that is part of Node.js in the browser "server"<p>The browser is still running its original js engine with none of the Node goodies. It merely receives proxied requests, does some stuff to it, then sends it back to the proxy, which returns it to the client.
评论 #4367007 未加载
评论 #4366959 未加载
arunodaalmost 13 years ago
Nice attempt. But your title is misleading.<p>You just listen for a URL and forward it to the browser with socket.io (Pusher, Pubnub are some commercial services for this)<p>If I can change some content in your webpage by just curling <i>localhost</i>, I can judge the title you put :)
评论 #4366938 未加载
评论 #4366700 未加载
评论 #4366751 未加载
aba_sababaalmost 13 years ago
I don't really see why this is special. It's just a websocket connection that happens to show every request made to the server. Your browser is not a server, no matter which way you cut it.
评论 #4367140 未加载
statealmost 13 years ago
I think there's a ton of unrealized potential in this kind of thinking. Although people will say 'But that was done by X a year ago!' I see that as evidence that this is gaining momentum.<p>Now, what's the project that will fully take advantage of this kind of thing?
评论 #4366882 未加载
评论 #4367266 未加载
mcantelonalmost 13 years ago
Weinre is a project that, if my understanding of it is correct, leverages the same basic idea. It's used to remotely debug mobile browser issues and also uses Node.<p><a href="https://github.com/apache/incubator-cordova-weinre" rel="nofollow">https://github.com/apache/incubator-cordova-weinre</a><p><a href="http://www.youtube.com/watch?v=4nL6xey13fE" rel="nofollow">http://www.youtube.com/watch?v=4nL6xey13fE</a>
VikingCoderalmost 13 years ago
...I'm looking forward to WebRTC, which should make this obsolete, right?<p><a href="http://www.webrtc.org/" rel="nofollow">http://www.webrtc.org/</a><p>That said, this is cool!
评论 #4367931 未加载
quartertoalmost 13 years ago
<i>It's not just you! <a href="http://browserver.org" rel="nofollow">http://browserver.org</a> looks down from here.</i>
评论 #4366654 未加载
Kilimanjaroalmost 13 years ago
Just add a text area and let people share some html. Now that would be cool!<p>Change some HTML in that text area and refresh automatically in all listeners.<p>That would be an interesting toy to play for a while.
sehropealmost 13 years ago
Anyone know if browserver.org is self hosting (i.e. running on some guys desktop/laptop in a browser window)? Site is down at the moment and I'm wondering if this is why.
评论 #4366672 未加载
mgurlitzalmost 13 years ago
Github has a good readme if this site doesn't stay up: <a href="https://github.com/jed/browserver-node" rel="nofollow">https://github.com/jed/browserver-node</a>
评论 #4366690 未加载
alan_cxalmost 13 years ago
Ok so I can access it either, but:<p>Loading the app... If this message doesn't go away within 10 seconds, it means that the server crashed under heavy load. Please refresh mercilessly.<p>:)
mislavalmost 13 years ago
Mind-bending.
rip_kirbyalmost 13 years ago
If you look at the favicon, there's two of them faviconception
sharps_xpalmost 13 years ago
I do not understand what is going on.
debaclealmost 13 years ago
And they're down.<p>It was a good 15 minutes, though.
评论 #4366632 未加载
shawndumasalmost 13 years ago
෴
bestestalmost 13 years ago
What sorcery is this!
napoluxalmost 13 years ago
We put a server in your browser. #inception
mekwallalmost 13 years ago
Hacker News killed it with fire!
评论 #4367364 未加载