Node.js is an event-based, asynchronous I/O framework that uses Google's V8 JavaScript engine. Node.js is commonly used for heavy client-server JavaScript applications.
2
votes
2answers
44 views
Parsing time-strings in Javascript
So, I have this web server that parses an XML-file with a certain 'time-period'.
The time-period is presented as follows (I can't change this):
00:05:00
00:09:15
01:13:15 in an HH:MM:SS format.
I ...
0
votes
3answers
45 views
Uses of javascript, not just for aesthetics but uses on the server side
I have read this article (Uses of Javascript), while it is right I know there are other uses of javascript, modern javascript nowadays. I haven't read about node.js and how this one works but I have ...
1
vote
1answer
44 views
array search / for loop
I've currently got a implementation which loops through an array within a json document (returned from mongoose) and looks for specific items as below
So what's happening is i'm passing an id in the ...
0
votes
1answer
18 views
Node.js async consistency
I have the following code :
server.use(function(req, res, next) {
users_db.set(req.user, function(err) { // async call to mongodb
if (err) {
console.error(err);
}
...
0
votes
1answer
20 views
Can't add plugins using `phonegap plugin add XXX`
I've installed phonegap version 3 using npm install -g phonegap and now i want to install plugins for the andriod app
I installed node.js
C:\var\www\sexdiaries.co.uk\app>node -v
v0.10.17
Then ...
1
vote
2answers
17 views
Nodejs async module which has transaction
I want to use sqlite database in my project on nodejs. I'm looking for a module for sqlite, which will be operating support for transactions and asynchronous
0
votes
0answers
14 views
How to implement document parenting in node/MongoDB
I am trying to implement my own acl module for node using mongodb. I know some of them already exists, but for experience purpose I want to create my own :).
We will have roles, and users. Each role ...
0
votes
1answer
22 views
Coffescript and Nodejs coding style regarding callbacks
Let's get to the point. I love CS, I love node and I'm more than fine using callbacks as the Gods have suggested.
Unfortunately I usually end up constantly checking for errors in slightly nested ...
0
votes
0answers
9 views
annoyance node.js calls httpserver callback function twice for one single page refresh
When loging the OnRequest function below (found in this tut http://www.nodebeginner.org/)
var http = require("http");
function onRequest(request, response) {
console.log("Request received.");
...
0
votes
0answers
18 views
Change an elements CSS value within a node.js module
How can I change an HTML element CSS value from within a node.js module?
I have a raspberry pi setup with node.js and have physical buttons (hardware) which when pressed turn on LED's but I would ...
1
vote
0answers
8 views
How to connect URM37 (rangefinder) to Arduino and read data through nodeJS
I bought this range finder http://www.dfrobot.com/wiki/index.php/URM37_V3.2_Ultrasonic_Sensor_(SKU:SEN0001)
And now I'm having difficulties to make it work on nodeJS.
My setup is Arduino UNO and ...
1
vote
1answer
14 views
error handling on readFileSync in node.js
I have this code
var fd = fs.openSync(filePath,"r");
var fr = fs.readSync(fd, buffer, 0, size, 0);
and it throws error like that
events.js:72
throw er; // Unhandled 'error' event
...
1
vote
0answers
11 views
Installing PhoneGap on Linux [on hold]
I already install Node JS. I install Phonegap with the following command :
sudo npm install -g phonegap
But I get the following error:
This image is is my error screen Capture.
0
votes
0answers
24 views
Node.js installation error
I tried to install node.js on a Windows 8 machine, but I got the following error:
The cabinet file 'media1.cab' required for this installation
is corrupt and cannot be used. This could indicate ...
1
vote
0answers
13 views
why childprocess can't catch 'SIGINT'
father.js
var spawn = require('child_process').spawn;
var child = spawn('node',['child.js']);
setInterval(function(){
child.kill('SIGINT');
},2000);
child.on('exit',function(code,signal){
...