Node.js is an event-based, non-blocking, asynchronous I/O framework that uses Google's V8 JavaScript engine and libuv library. It is used for developing applications that make heavy use of the ability to run JavaScript both on the client, as well as on server side and therefore benefit from the re-...

learn more… | top users | synonyms (2)

0
votes
0answers
6 views

Node js express - My query isnt returning what i exspect, any thoughts?

When I run this route with http://localhost:3000/buyersearch I get "please enter an Buyer Identifation Number" as aspected. But when I run http://localhost:3000/buyersearch?buyerID=2447 it should ...
0
votes
0answers
3 views

Angular 2 live site different to npm start site

Currently my live site and production site (the one where you get an ip and port) look different for some reason. Is there any reason why? Is there a setting I somehow missed? It was matching the ...
0
votes
0answers
4 views

Chunk filter with NodeJS memoize prevents view refresh in AngularJS

Im using nodejs memoize to chunk an object in Angularjs (to better use it with bootstrap columns) app.filter('chunk', function() { return memoize(chunk); }); and in view: <div class="row" ng-...
0
votes
0answers
14 views

Prompt (Node.js) - get results outside of function

I'm looking to get result.x and result.y outside of the function but I'm at a loss for how to do it? I think I should be using this, but this keeps throwing up errors? (Although I'm not sure I'm using ...
-1
votes
0answers
7 views

What is the difference between async.each and async.forEach?

How are async.each and async.forEach different? Are there any performance differences?
0
votes
0answers
5 views

node js sessions reset to null after res.redirect

I'm learning Node js for a school project and it doesn't work out the way i want it to. I'm doing a simple User CRUD model with Mongoose, using express, express-sessions. When i'm logged in, the ...
0
votes
1answer
10 views

How to reconfigure Node.js?

There's an open-source date library(date-fsn) that was written in JavaScript and currently I'm working on to add Farsi language but the format of Jalali calendar to the Gregorian calendar is different....
0
votes
0answers
4 views

Using azure app service with webpack+nodejs without long deployment outages

I'm trying to use webpack with my (fairly large) NodeJS app, deploying as a Windows Azure App Service using Git continuous deployment. I customized my kudu deploy.sh script to run webpack, but it ...
0
votes
0answers
4 views

Retrieving connection pool from Knex (to share it with express-mysql-session)

I've got knex configured to use MySQL with pooling: var knex = require("knex")({ client: "mysql", connection: { host: ..., user: ..., password: ..., database: ....
0
votes
0answers
5 views

nginx, express, nodejs app 502 bad gateway

I run this app https://github.com/scotch-io/react-tweets in my ubuntu 16.04 box (digital ocean) The app is running fine locally with port 8001. e.g. curl 0.0.0.0:8001, I get html output. The problem ...
0
votes
0answers
8 views

Error: Cannot find typescript def for ‘node’ inside events.d.ts file

ionic 2.1.13 typings 2.0.0 npm 4.0.2 cordova 6.4.0 I'm building an Ionic 2 app with Firebase, the app has ran successful so far but now I'm getting this error, screen capture of error message I'...
0
votes
0answers
4 views

Conflicts using Brew for Node, NPM, Bower, etc. on Mac OS X 10.12.1

I'm really sorry if this has already been answered in another thread, but I searched through the other Brew-Node (Mac) questions, and couldn't really find specifically what error I was receiving. I ...
-1
votes
0answers
9 views

NPM dependencies fail to load on AWS lambda

I have some node code which I am trying to run on lambda that depends on the pg npm package exports.handler = function(event, context, callback) { var pg = require('pg');// this line is what kills ...
0
votes
1answer
4 views

webpack module node produces error EISDIR: illegal operation on a directory

Trying to learn webpack but I keep getting this error whenever I introduce the module node into webpack.config.js Error output: ERROR in ./src/main.js Module build failed: Error: EISDIR: illegal ...
0
votes
0answers
7 views

Bitbucket pipeline mongodb

I'm trying add mongodb on my bitbucket pipeline but I've the following error: Uncaught MongoError: failed to connect to server [localhost:27017] on first connect My bitbucket-pipelines.yml: ...
0
votes
0answers
7 views

Redis Message Queue - Auto receive message in NodeJS app

I am building a nodeJS application. I am using redis message queue. But to receive a new message pushed to the queue I have to call rsmq.receiveMessage method. I want this to be automatic like when a ...
0
votes
0answers
6 views

Firebase request with token?

I have a node app where I am trying to pull data from Firebase using a Firebase auth token. I used to do this using the npm firebase package but since Google updated the package I haven't been able ...
0
votes
0answers
5 views

Check if a Message in the SentItems Folder had a Draft Counterpart Before being Sent

When a user is drafting an email, it shows up in the Drafts folder until it is sent. Once it is sent, it is removed from the Drafts folder and inserted into the SentItems folder, but as an entirely ...
0
votes
1answer
13 views

CGI version of expressjs

I want to create a small web service and for that I really want to use node.js and express. I already have an Apache running on my little server (it's a Raspberry PI :P ) which receives all the ...
0
votes
0answers
5 views

Does querying for a specific value instead of whole documents matter much in terms of speed in MongoDB and Node.js?

For example, should I use a specific call when I only need a specific value of a user, or can I just as well retrieve the whole document of the user? Thanks.
0
votes
1answer
8 views

Get the Duration an Outlook Email was Composed for

I've looked at the Message (email) class in the Office 365 API Resource Reference, as well as the other classes and various Office 365 docs, but there doesn't seem to be an elegant method for ...
1
vote
0answers
13 views

Proxy Server on top of Several Node Machines to route the requests

I have several machines with node.js installed on them and I want to have a proxy server on top of all of them which will handle and route the requests. Please look at the diagram the number of ...
-1
votes
2answers
20 views

Node JS Express - message is not defined - error.ejs

http://localhost:3000/buyersearch/buyersearch - what I search enter image description here - This the error I get, what's the issue? All my other routes work except this one. The route is getting an ...
0
votes
2answers
15 views

How to query for an array of users in my users collection in mongodb using mongoose?

I have a collection of some users (along with their contact numbers) registered in my node and mongodb app. Now I have an array of contact numbers. I want to get an intersection of this array and the ...
0
votes
1answer
31 views

Extracting valid date from a string

I need to extract a valid date from a list of random strings. The date can be present in any date format("01/25/16", "25/01/2016", "20-01-2016", "3-Nov-2016" etc) with different kind of separators. ...
0
votes
6answers
28 views

Pushing values inside array using foreach

Here's my input var id = '1,2,3'; var name = 'a,b,c'; var value = 'x,y,z'; How can i construct a array like this [ { "id" : "1", "name" : "a", "value" : "x", } , { "id" : "2", "name" : "b", "value" ...
0
votes
1answer
11 views

Write file and usage nodejs express

For a school project I'm creating a portal for KVM using NodeJS and Express. I need to adjust an XML file and then use that XML File to create an VM. So i created 2 functions CreateXML: ...
0
votes
0answers
13 views

remove exclamation from routing of state url Mean.io

I want to remove exclamation marks from url state routing like my url is now http://localhost:3000/#!/auth/register i just want to remove this "!" marks from url after "#"
2
votes
1answer
25 views

Should be an input data object cloned before it's processed by application logic?

I work on an open source project - object document mapper aka. ODM in javascript and am facing a design decision I struggle with (rather simple but not easy) . In the ODM you can define a Model ...
0
votes
1answer
9 views

passport.authenticate('facebook') times out waiting for localhost

I am trying to implement facebook login into an existing express app using passport-js. Following the documentation this seems pretty forward - but now I have hit a spot where I don;t know what to do. ...
0
votes
0answers
10 views

Browserify uncaught reference error

I am using browserify to be able to use the validator npm module client side. I have linked the bundle.js file created by browserify to the HTML page I would like to use the validator module on. ...
0
votes
0answers
14 views

fs.watch() does not detect new files, Nodejs

I am having issue with fs.watch(). I am having mounted webdav folder in Linux. If I put in this folder manually file, i can get new event, but if the file is put by client via webdav, it does not ...
0
votes
0answers
29 views

mongoose findByIdAndUpdate instead of save

I'm trying to update the value of an element inside an array of my document. The common way of update via save works as expected, but trying to use an static method, like findByIdAndUpdate doesn't ...
0
votes
0answers
7 views

Save captured video to file in Electron

I want to save a video that is captured from webcam to a local file. So far I have been able to: Create a stream with getUserMedia Encapsulate the stream with RecordRTC Get blob from RecordRTC I ...
0
votes
0answers
26 views

Why is my angular js app adding characters to the url?

The url I enter is http://localhost:8080/app/#/intro but it turns into http://localhost:8080/app/#!/intro#%2Fintro
0
votes
1answer
21 views

Create Node REST API that calls remote REST API and returns results

I have a local REST API though I'm only really dealing with POST's. mysite/api/ -> http://remoteSite.com/api/ so when my front end hits my endpoint with params the server would then post those to ...
0
votes
1answer
11 views

How does the following script works when started with a NPM build command

I have package.JSON file in which the script is mentioned as, "scripts": { "typings": "typings install", "build": "tsc && webpack", "watch": "npm-run-all -p -r -l tsc-watch ...
-1
votes
2answers
38 views

How to read value from JSON object Array in Nodejs?

I'm trying to read individual value from be json array object to display in the page. I have tried with below code but couldn't make it. Please advise what am i doing wrong here. Apperciate your help....
0
votes
1answer
14 views

Reading a portion of the file defined by 2 end points in nodejs

I am a newbie on nodeJs, but i am loving it already. I have the following data.xml file. <data> <student> <age>16</age> <name>Bill</name> </student> &...
0
votes
1answer
16 views

topojson.feature with topojson v2

I've been following the "let's make a map" tutorial htt ps://bost. ocks.org/mike/map/, however in the middle of the tutorial, drawing the paths failed with errors about topojson.feature() is not a ...
0
votes
0answers
24 views

Is it possible to make my app open and run in a server? If yes, how?

I am using AngularJs to develop a tool for the company I work for. My issue is that unless the app is running on a server, it will not allow me to make use of things like routing or ng-include—it does ...
0
votes
1answer
26 views

Log without erase

What's the best way to log a dynamic variable? Example: while running the app, my log changes size and data. I want the log to not change, and simply save data. This is my code for creating the log ...
0
votes
0answers
30 views

Node.js and ColdFusion on the same server?

I have question about how to set Node.js server application. On my server I have ColdFusion application server. I can test my code through browser url. I would like the same for Node.js. Node is ...
0
votes
1answer
14 views

Giving node command line params via package.json

The following quote comes from the Jest documentation: Notice that Proxy is enabled in Node.js v6.* by default; if you are not on Node v6.* yet, make sure you invoke Jest using node --...
1
vote
1answer
9 views

Using piped output from find in uglify-js and sass

I'm exploring the usage of NPM as a build tool and have run into an issue that's got me stumped. What I'd like to do is use find to get a list of files and then pipe these into a command like uglify-...
0
votes
0answers
13 views

mocha tests with database connection

I'm using mocha to test database models in mongoose. I have before hooks setup that create my connection: let Dbs; before(() => { return db.then(res => { Dbs = res; }); }); This db ...
0
votes
0answers
9 views

Error 'Timeout of 2000ms exceeded' while testing express api with mocha

I am testing a nodejs api built with express using mocha there is the code /* eslint-env mocha */ const request = require('supertest') const server = require('../../bin/www') const assert = require('...
1
vote
0answers
18 views

Mongodb data to a nodeJS file

I have a MongoDB which passes data onto a nodeJS file. The nodeJS has a function to add an item and then that redirects the user to another page. However I need the array which should be in the "...
0
votes
0answers
14 views

Variable not being interpreted properly within quotations

let adminIDs = _.map(Cause.admins, 'id'); let message = { app_id: '**************', contents: {"en": "Yeah Buddy, Rolling Like a Big Shot!"}, filters: [{"field": "tag", "key": "userId", "...
0
votes
1answer
11 views

How to check whether Nodejs node modules are installed or not in Heroku

I have developed a sample Node JS application , and have deployed in Heroku. When I check the application in browser , due to some reason , which I am not aware of , it displays a JavaScript error in ...