Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Local pi server running node and websockets

Local pi server running node and websockets

Problem

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.

Problem courtesy of: Techhead55

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.

Solution courtesy of: oberstet

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Local pi server running node and websockets

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×