From aed06408cfbc289be2eb01b5e88c3ba2d66247f3 Mon Sep 17 00:00:00 2001 From: Cooper Maa Date: Thu, 15 Jan 2015 13:19:37 +0800 Subject: [PATCH 1/5] Add a start up scripts in package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index e0fa1b9..d50c535 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "author": "Cooper Maa ", "private": true, "engines": { "node": ">= 0.6.0" }, + "scripts": { "start": "coffee app.coffee" }, "dependencies": { "socketstream": "0.3.2", "ss-stylus": "0.1.x", From 4311b8cf9226e78992e45e9e929d31244d5f2477 Mon Sep 17 00:00:00 2001 From: Cooper Maa Date: Thu, 15 Jan 2015 14:05:41 +0800 Subject: [PATCH 2/5] Add a Dockerfile for node-webduino --- Dockerfile | 13 +++++++++++++ README.md | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2f7f419 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM dockerfile/nodejs-runtime +MAINTAINER Cooper Maa + +RUN npm install -g coffee-script + +# Upgrade socket.io of the socketstream dependency package +# There is a "can't set headers after they are sent" bug in +# socket.io < 0.9.15, so we have to upgrade socket.io. +# Note socket.io@latest seems not compatible with socketstream +RUN cd node_modules/socketstream && \ + npm install socket.io@0.9.15 --save + +EXPOSE 3000 \ No newline at end of file diff --git a/README.md b/README.md index c0dd067..408458e 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,19 @@ Here is a screencut of node-webduino for Arduino UNO: ![screencut](http://bit.ly/XHta3m) +## Dockertized node-webduino + +Suppose your Arduino is on /dev/ttyS1, then save the alias setting below to ~/.profile +or ~/.bashrc: + + $ alias node-webduino="sudo docker run -d --privileged \ + -v /dev/ttyS1:/dev/ttyACM0 \ + -p 3000:3000 coopermaa/node-webduino" + +Then run following to start node-webduino: + + $ node-webdunio + ## License [The MIT License](http://opensource.org/licenses/MIT) From 1d94d2c94e6df579c093d7cdc91bbfbc5c71d584 Mon Sep 17 00:00:00 2001 From: Cooper Maa Date: Thu, 5 Feb 2015 09:59:27 +0800 Subject: [PATCH 3/5] Fix a typo in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 408458e..bc5455a 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Here is a screencut of node-webduino for Arduino UNO: ![screencut](http://bit.ly/XHta3m) -## Dockertized node-webduino +## Dockerized node-webduino Suppose your Arduino is on /dev/ttyS1, then save the alias setting below to ~/.profile or ~/.bashrc: From f14204333a45081d40d9be6d9d483069a76ec869 Mon Sep 17 00:00:00 2001 From: Cooper Maa Date: Fri, 17 Jul 2015 15:02:10 +0000 Subject: [PATCH 4/5] Add a note to installation section of README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index bc5455a..dfca320 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,15 @@ this repository and prepare it for use with: $ cd node-webduino $ npm install +Upgrade socket.io of the socketstream dependency package. There is a bug "can't set +headers after they are sent" in socket.io < 0.9.15, so we have to upgrade + socket.io. + + cd node_modules/socketstream + npm install socket.io@0.9.15 --save + +Note the lastest socket.io seems not compatible with socketstream. + ## Usage Upload Standard Firmata to your Arduino. Better to change samplingInterval from @@ -51,3 +60,4 @@ Then run following to start node-webduino: Credits: Developers of node.js, Arduino, SocketStream, AngularJS, firmata and people who involved in improving Web technologies. + From 63b4c49bd06df338ba3fe8409eefc4b98b363e17 Mon Sep 17 00:00:00 2001 From: Cooper Maa Date: Fri, 17 Jul 2015 15:03:28 +0000 Subject: [PATCH 5/5] Use official node:0.12-onbuild image as base dockerfiles/ repository was removed from hub.docker.com Signed-off-by: Cooper Maa --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2f7f419..77bc38c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM dockerfile/nodejs-runtime +FROM node:0.12-onbuild MAINTAINER Cooper Maa RUN npm install -g coffee-script @@ -10,4 +10,5 @@ RUN npm install -g coffee-script RUN cd node_modules/socketstream && \ npm install socket.io@0.9.15 --save -EXPOSE 3000 \ No newline at end of file +EXPOSE 3000 +