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.
0
votes
0answers
8 views
Wrapping a C++ Object to a v8 Object in a Node Addon
I'm currently writing a Node addon in C++, and I'm running into an issue where I need to make and return a v8 Array filled with v8 wrapped C++ object instances.
At the moment, the code looks ...
0
votes
1answer
8 views
How to Post data with express?
I have a pretty good understanding of how to use the app.get function, but I'm having trouble with the app.post.
In the following app.js code, should the /someurl be the same as in the ...
0
votes
0answers
5 views
How do I manually flush a pipe to a child process in node.js?
I am trying to run the a script on node.js which sequentially sends numbers to an executable a.out, which squares it and writes the result on its stdout. When that happens, the next number will be ...
0
votes
1answer
10 views
How do I load phonegap/cordova with jade?
I am developing a Web Application using node.js, express and jade. I have the following jade template which I am seeing using a WebView in a Phonegap application:
doctype mobile
html
head
...
0
votes
1answer
15 views
socket.io refresh list of connected clients
At the moment I have a websocket server that generates a uuid for every connection made to it and passes that onto the client, and on the client side I update a simple list with all the connections. ...
0
votes
0answers
12 views
Is there a way to continually keep a few blank lines below where the user inputs in a CLI (terminal) program?
I've a little node program that runs in terminal that asks users for input. After several user responses, the Make a selection: is pushed down to the bottom of the terminal.
Visually, I want to have ...
1
vote
3answers
21 views
Javascript scoping error function that returns functions
This is a simplified version of my function. The problem is that I get 2 both times in the alert. I believe this is a variable scope problem, but I can't seem to figure it out.
var someObj = {"a" : ...
-1
votes
0answers
8 views
How do I set up a simple nodejs client and server for Facebook with signed request validation?
I am looking for a simple example on how to get (in a client) the user's signed request, send it to the server, have it validate my signed request and return or echo serverside whether its validated ...
0
votes
1answer
11 views
Chai exports are not found in Mocha test
I have created simple Mocha test. It works perfectly when Node "assert" module is used. I run it from command line (Mocha is installed as a global node module):
$ mocha myTest.js
․
1 test complete ...
0
votes
1answer
11 views
Emulate server in Node.js - stream delimited file with 1-second pauses
I'm new to Node.js and I am writing a client to consume a text-based TCP stream from a server. For testing purposes, I want to simulate the server in Node so I can test with no other dependencies.
I ...
1
vote
1answer
16 views
In Mongoose, how to filter an array of objects
I have the following schema:
var sampleSchema = new Schema({
name: String,
dates: [{
date: Date,
duration: Number
}]
});
I'd need to filters the records according to the following ...
1
vote
1answer
17 views
Refreshing information in Node.js from filesystem with jade template engine
I'm currently writing a node.js app currently using: express, jade, and js-yaml. The YAML parser loads the file that I need to load easily.
require('js-yaml');
var file = require(path);
The ...
0
votes
1answer
15 views
Array to function parameters
I'm using the node.js Redis library and I'm attempting to bulk-subscribe to many keys. I've got an array which is dynamic i.e
var keys {'key1','key2',...,'keyN'}
and I want to feed each index in ...
0
votes
0answers
11 views
HTTP response image manipulation node js
I am a Node js beginner. I have to create a proxy server which modifies all the images (add a watermark over them) in the HTTP response, before they are delivered to the client. I would be grateful if ...
0
votes
1answer
11 views
Validate xml/json before decoding in nodejs
I was trying to get the response from some server. Server can send response in xml/json format based on the request type.
Now how I can determine if the data has come in xml/json format, if the data ...