0
votes
1answer
29 views

Variable got cleared unexpectly

I am implementing a function to read contents in local foo.txt. var fs = require("fs"); var path = require("path"); var realpath = path.resolve("./foo.txt"); fs.open(realpath, "r", function(err, ...
1
vote
0answers
12 views

socket.io with express to update variables in the DOM

this is the test case... app.js var express = require('express'), http = require('http'), //other variables var app = express(); var server = http.createServer(app); var io = ...
0
votes
0answers
8 views

What is Upstart command that make node.js read file request from user

I has this small block of codes running my node.js application: start on (local-filesystems and net-device-up IFACE=eth0) stop on shutdown script export HOME="/root" exec ...
0
votes
1answer
9 views

Do ObjectIds that reference Models have their own timestamp? (Mongoose v3.6.15)

Defined in the Blogpost model. schema.user = { type: mongoose.Types.ObjectId, ref: 'User' }; Later on when accessing a document matching the model... // Timestamp of when the user was created. ...
0
votes
0answers
8 views

Dropzone paramName for server

How do I give my dropzone a "name" like an input. my code works perfectly with an input type="file" but not at all with dropzone. HTML: <form method="post" action="http://127.0.0.1:3000/send" ...
0
votes
0answers
50 views

How to handle modules in an asynchronous app in node.js

for (var i = 0; i < users.length; i++) { if (users[i].access_token !== undefined) { var syncer = require('dropsite_server/dbox_sync'); var client = dboxApp.client(users[i].access_token); ...
4
votes
3answers
37 views

Strategies for handling exceptions between ticks (or, stacks) in Node.js? [duplicate]

I've got the following: var http = require('http'); server = http.createServer(function(request, response) { try { // Register a callback: this happens on a new stack on some later tick ...
4
votes
1answer
54 views

How to chain exceptions in javascript (ie add cause like in java)

Is there a standard / best practice way to add a cause of an exception in javascript. In java you might do this: Throwable t = new Exception("whatever"); t.addCause(previouslyCaughtException); throw ...
0
votes
0answers
24 views

Javascript won't work after socket connection?

I need to connect to socket io on my server from HTML. The problem is, when I declare the variable for socket, everything after that does not work. When I move the socket code to after the alerts, ...
0
votes
0answers
14 views

Problems installing yeoman

I am trying to install yeoman but I am getting the following error messages: I did install node.js and npm (latest version),now I am doing this npm install -g yo grunt-cli bower and npm install ...
0
votes
3answers
46 views

Cannot read property 'undefined' of undefined, but I'm sure the var is valid

I am parsing a smil (xml) file to get a list of pathname. The parsing go well, and is stocked in a huge literal object. But when I try to get the information back, I only get: ...
-1
votes
0answers
43 views

Array of litteral object and length

I m working on a TV player with a raspberry pi on raspbian The video to play are received under a smil (xml) file, I have made a function to parse it, but since the code is quite long, I ve putted it ...
0
votes
2answers
47 views

A strange feature of node.js

Noticed a strange feature of node.js. For example: Let's say, I've got some variable on node.js server: var user_id = '1';, in which the stored user id which is connected to the server. user1 have ...
0
votes
1answer
28 views

Start a function at a specified date

I m working on a TV player on raspberry pi/raspbian The player part work, my playlist work too, but I m stuck at this: I get the playlist with a start date (parsing is ok), but I have no idea how I ...
1
vote
0answers
13 views

node-validator and asynchronous validation

I'm working on my first Node.js-project and I've stumbled over a problem. I'm using node-validator for input validation and Sequelize as an ORM. The problem with async validation I'm trying to write ...

1 2 3 4 5 500
15 30 50 per page