Question

I'm just wondering is it possible to run a local server using node (node would be running on a raspberry pi) and communicate with it via a web browser on a different machine on the same network using websockets? I'm looking into using a browser as a control system for a project I'm working on. If it is possible is there any references I can look at?

Thank you, Techhead55.

EDIT I already have node up and running on the pi, it's just that I'm not sure if you can and how you implement a local server and use sockets to communicate with it in a bowser on the same network.

Was it helpful?

Solution

Not sure if you specifically ask about Node, but here is an example of a WebSocket server running on Pi, and browsers connecting to that server: http://tavendo.com/blog/post/pypy-on-the-pi/

The example does Publish & Subscribe over WebSocket using WAMP (http://wamp.ws).

Here is a similar example running on Arduino Yun that shows how to connected hardware, and publish data in real-time via WebSocket, receiving data in a browser, and real-time rendering a chart: http://tavendo.com/blog/post/arduino-yun-with-autobahn/

Disclosure: I am original author of Autobahn and work for Tavendo.

OTHER TIPS

Yes.

Here is great manual from Matthias Rüedlinger:
http://blog.rueedlinger.ch/2013/03/raspberry-pi-and-nodejs-basic-setup/

Also installation of ghost with node on RPI is very nice :)
http://bit.ly/1cFwFAQ

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top