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.

learn more… | top users | synonyms (1)

0
votes
0answers
8 views

Get empty Array in first loading page

When I call below function and show data at view of my ejs. There is no data at the first time of loading after the server start. But can get datas from second times of loading. That just only empty ...
0
votes
0answers
3 views

Creating thumbnail of image and uploading in s3 bucket

I am getting an image in file parameter. I need to convert it to thumbnail and then upload both images to s3 bucket. Please suggest a way out. I just don't know how to start with.
0
votes
1answer
8 views

Return collections from Mongo using a MEAN stack

I'm currently working on a group project. We're using the MEAN stack to create a simple web application but are running into some issues with returning data from the mongo database. We're trying to ...
0
votes
0answers
9 views

node.js and async module error

I am getting an undefined variable in my code and not sure what the error in my code is: I get client as undefined when I call getClient... I have a soap client creation singleton and I have: ...
-1
votes
0answers
17 views

Homework List & Nodes

Create a List class with the following interface (at a minimum): List::addItem //add an item to the list List::getLargestValue //find the largest value stored in the list In addition, create a ...
-4
votes
0answers
13 views

Write code that demonstrates one computer language calling and receiving data back from another language

Write code that demonstrates one computer language calling and receiving data back from another language. The first language reads two integers from the user (A, B) and passes them as binary values to ...
0
votes
0answers
8 views

How to detect same file names in different folders while using Grunt?

I need to write a concat script using grunt. here is my boilerplate: ___js |____dist | |____vents | | |____carousel.js | | |____compare.js | | |____style.js |____src | |____events | | ...
0
votes
0answers
10 views

MongoDB disconnection in node.js never send error

I im using the Mongoclient to create a connection to mongo from node.js var serverOptions = { 'auto_reconnect': true, 'poolSize': 5, 'native_parser': true, ...
0
votes
1answer
12 views

How to read from stdin line by line in Node

I'm looking to process a text file with node using a command line call like: node app.js < input.txt Each line of the file needs to be processed individually, but once processed the input line ...
0
votes
0answers
5 views

How to implement Oauth2 Provider in REST Api Server?

I am developing REST API Server in Node.js and it is almost Ready. Now I am trying to implement Authentication to API server. I decided to use OAuth2 for this. I think I will be Using grant type ...
0
votes
0answers
7 views

Cannot scroll in CLI using readline module in NodeJs

I am using the readline module to create a command line interface (CLI) for an application in Node.js. The problem is that I can not scroll up to view the past commands as I usually can in Terminal. ...
-1
votes
0answers
14 views

How can I do a has many relationship in Mongoose?

ITEMS _id price name shop_id SHOPS _id name I'm building a geolocation app and I need to get stores and the items they have in them. I used NodeJS + Mongoose for quickness and I understand ...
0
votes
1answer
40 views

Is every function call in javascript practically a new thread?

I'm from a C background and find the asynchronicity of javascript very cool. I don't know however how things are asynchronous. Is it that every function-call is practically a new thread?
0
votes
2answers
18 views

Using pipe() in Node.js net

I'm having trouble wrapping my head around the pipe function shown in several node.js examples for the net module. var net = require('net'); var server = net.createServer(function (socket) { ...
0
votes
1answer
14 views

node.js async parallel function returns a single result several times

I'm trying to upload several files in parallel using node.js's async module. My code looks like: // fileArr is an array of objects. each object contains the attributes of the file to be uploaded - ...
0
votes
0answers
8 views

Cant find node-gyp module

So I have a project where I've been using node-gyp to port C++ to node.js. Everything's been working but when I used to run node-gyp build but I would get allot of warnings for doing things like using ...
0
votes
2answers
8 views

I would like to get by node.js app to serve up multiple html files

So right now I have the following code to allow 'index.html' to be correctly displayed at: http://staging-supermodels.herokuapp.com/ But my question is how can I change it so that my other files like ...
0
votes
0answers
3 views

Phonegap - Cordova CLI create Titanium Studio folder after installed

Hello everybody I'm about to install cordova - phonegap on OSX 10.9 Before I have a Appcelerator Titanium installed on my machine then I removed it. I have Node and NPM installed on my machine, trying ...
0
votes
0answers
8 views

scraping nested xml using cheerio

I'm trying to scrap some PubMed data using cheerio. The following script works ok but when some xml tag does not exist, it generates an erroneously ordered output. var request = require('request'), ...
0
votes
1answer
5 views

How to connect to FindPopularSearches on the Ebay API using node?

I'm using the "request" module and passing all the correct arguments for the Ebay API's FindPopularSearches endpoint and no matter what I do, I keep getting this error: Getting popular keywords is ...
0
votes
1answer
16 views

Running Mocha on the command line and Including a file

I’m trying to setup some JS Unit tests using Mocha, and Ideally, I'd like to run this via the command line oppose to a web page. (TL:DR; at the bottom) First I did some bullshit test to confirm that ...
0
votes
2answers
18 views

PB mongodb, mongoose, node.js

I get this error when I try to insert something in mongodb, can you give me a doc for understand and do what I need please ? ...
0
votes
0answers
16 views

node.js app not listening on port

I want to make my node.js app running at boot time, I used upstart and followed the instruction as below: #!upstart description "node.js server" author "joe" start on startup stop on shutdown ...
0
votes
0answers
23 views

Client-Server Concept app [on hold]

I am very new to the web developing industry. Usually I worked always on the client side. I have received lately a project which is look something like that: C++ Embedded program talk to--->Server app ...
0
votes
0answers
11 views

Sequelize.js afterUpdate hook pass changed values

I'm building a node.js app and I'm evaluating Sequelize.js for persistent objects. One thing I need to do is publish new values when objects are modified. The most sensible place to do this would seem ...
1
vote
0answers
13 views

How can I know from a .csproj file if nodejs is installed on the computer?

I am building *.less files using a custom target in *.csproj and the original compiler that requires nodejs. Node isn't available on all development machines, so I need to be able to switch off the ...
0
votes
0answers
11 views

Unable to verify leaf signature

I'm using node.js request.js to reach an api. I'm getting this error [Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE] All of my credentials are accurate and valid, and the server's fine. I made the same ...
0
votes
0answers
8 views

unable to debug a node script after sending it the USR1 signal

I'm playing around with node-inspector, and trying to figure out how to debug an already running process. The method, as I understand it, is to send it a USR1, but this doesn't seem to be working for ...
0
votes
0answers
11 views

how to write advanced concat grunt script that find matches in seperate folders?

I need to write an advanced concat script using grunt. here is my boilerplate: ___js |____dist | |____vents | | |____commonEvents.js | | |____compare.js |____libs |____src | |____events | | ...
1
vote
1answer
25 views

Call the callback() after callback of another function completes

I have a method that I want to do some requests and calculations before it executes the callback. I have found many people suggesting to use the async module but it still doesn't wait for the callback ...
0
votes
0answers
8 views

Node.js Async | insert into postgresql database results from api

I am quite newbie with node.js. What i am trying to achieve is the following: Connect to my postgresql database and get info of a place (id, coordinates). call a weather api and get the info of that ...
0
votes
1answer
19 views

Inserting multiple values in Mysql using Nodejs and notifying user with a response

I am making a new webservice where i send a curl command with JSON and the JSON contains a array as ...
0
votes
0answers
13 views

node,express: stream video instead of loading in public directory (security relevant)

The app serves users and some admins. For every user, there will be a video associated which only the user himself or the admin can view. All the other videos are not accessible by a regular user. ...
0
votes
1answer
9 views

Return results from Request.js request method?

var request = require('request'); var cheerio = require('cheerio'); request(url, function (error, response, html) { if (!error && response.statusCode == 200) { var $ ...
1
vote
0answers
13 views

Serving Images over Websockets with NodeJS & SocketIO

I am trying to develop a very simple image server with NodeJS & SocketIO. A project I am working on requires me to load several hundred images on page-load (customer requirement). Currently, a ...
-1
votes
0answers
22 views

Best practice to implement data exchange between NodeJS based REST API and a rich client like AngularJS

I am working on a project which involves a server side (Node and Express) and client (browser and mobile) implemented by AngularJS. the client need to view list of items and be able to create/delete ...
1
vote
1answer
32 views

node.js global configuration

I'm currently working on a small console project that depends a lot on the arguments that are passed initially and I'm looking for a good way to handle a configuration object in nodejs. I have the ...
1
vote
0answers
18 views

ReferenceError: client is not defined Node.js Mongodb

I am creating a client management system and I am using a RESTful approach to create a dash board or sorts. But, unfortunate I am getting an error in terminal when trying to start a node server that ...
0
votes
0answers
17 views

Why does q promise not reject this error?

I'm trying to get the hang of q promises in node.js. The following code behaves correctly for the .resolve() case, but does not pass control to the error function when there is an error. Can anyone ...
0
votes
0answers
30 views

TypeError: Cannot call method 'writeHead' of undefined

I am running a simple nodejs application using index, server, router and requestHandler and it shows an error as soon as the line response.writeHead(200,{"Content-Type":"text/html"}); is reached. The ...
0
votes
0answers
5 views

Passport.js 2 ways authentication (session and stateless)

I am using the MEAN stack for my application. I am using the LocalStrategy to login with an email an a password) for my AngularJS application. However, I would like to make an Android app that will ...
-1
votes
1answer
11 views

Why does npm give status 8 exit error when trying to install bower windows 8.1 Pro, & how to fix?

I encountered the following issue when trying to install bower today in my "git shell" (windows powershell). Can anyone tell me what caused it? C:\Users\xx\desktop [master]> npm install ...
1
vote
1answer
16 views

callback hell in loop of queries

i'm trying to get a list of distinct values and count of items. like this: sheet_kinds: [ "cars" (10 items), "computers" (23 items), "utilities" (88 items) ], so the query to get ...
1
vote
3answers
31 views

Reformat Date Regex

I am writing an application in JavaScript (Node.js to be precise) and I currently have a date string formatted like this in a mongoose database: 2013-11-19T00:10:00-08:00 I want to run a query on ...
0
votes
0answers
7 views

Set priority on a firebase transaction (node js)

Is there a way to set priority in a transaction in firebase? I'm creating a system for voting on things using node, and I'm using a function like this to prevent collisions when users simultaneously ...
0
votes
3answers
44 views

Are node.js variables none blocking

I have some node code and I'm trying to set this up but it seems like it's processing one item before another is complete and I'm wondering if I'm right and if so if there is some kind of work around ...
0
votes
1answer
24 views

Adding values to mongodb by using Linux shell script

Here im trying to push some values to mongodb this is my pseudo code while read LINE do addRow $para1 $param1 #pass value to the mongo done < ${FILE} function ...
0
votes
0answers
6 views

log4js - clear a log file

Need help!! i got a node.js application with (log4js) and i want to delete(clear) the log file in the logs/users.log var logger = log4js.getLogger('users'); log4js.loadAppender('file'); ...
1
vote
3answers
35 views

Node.js Server running from a sub folder

So I'm pretty late to the Node.js party. Mainly because nobody invited me... Thanks. That said, I'm starting to work it out. I have come from an ASP classic background so there are a few things I have ...
0
votes
2answers
16 views

node.js and a singleton that has an asynchronous call in getInstance

I have a implemented a singleton following the model described in the book by Addy Osmani book, Learning Javascript design patterns. This singleton is setting up a soap connection. This is an ...

15 30 50 per page