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
3 views

Node.js detect when two mongoose find are finished

I'm trying to initialize two input with autocomplete with this library. When I load my page, I will trigger an Ajax to initialize two input text. But I don't know how I can detect when all my ...
0
votes
0answers
9 views

Kue/ How to add jobs to queue/inactive?

when i create job and get process, each job have state active, and number 2 -> 'queue.process('email', 2' doesn't affect. I'd like to add firts 2 jobs as active and other as inactive. Could you help? ...
0
votes
0answers
3 views

meteor make user's schema collection2 to login

I'd like use this schema as user and login or extend form users.I read documentation and I don't understand how extends from users. how I can make it? Dipendenti = new Mongo.Collection('dipendenti'); ...
2
votes
1answer
6 views

npm - error cannot find module 'umask'

I just installed nodejs x64 on my Windows 10 computer. I keep all default config, I open cmd and type: npm -v Then i got following error: module.js:457 throw err; ^ Error: Cannot find ...
1
vote
0answers
5 views

how to get people info using google api in node js?

I want to verify user google id on server side.So i want user google info by using google api.I have gone through all documentation but i stuck.I have seen this code,its working fine: var google = ...
0
votes
0answers
8 views

build json from multiple links, JavaScript

I have a json objectlike this {"test": [{"href": "http://sdfsd.fd"}], "test2": [{"href": "http://sdfsd.fd"}]} What I want to do is interate over all the links in the json, every likn point to ...
0
votes
0answers
30 views

Find 'holes' (gaps) in array of date ranges

Given you have an array of date ranges var arr = [ { "from": 1473117797756, "until": 1473722597762 }, { "from": 1473197886289, "until": 1474152686291 }]; What would be the ...
-2
votes
1answer
18 views

Why is the http.request never getting the response?

I'm trying the http.request in node. But my test script just never finishes. What is wrong? How can I debug this script? Thx! const http = require('http'); const parse_url = require('url')....
0
votes
0answers
7 views

electron Cant find module remote in the renderer process

I recently upgraded to electron v1.3 from 0.37 and get Cannot find module 'remote' in the renderer process. Been combing through the docs and haven't been able to come up with much here's a part of ...
0
votes
0answers
12 views

Map moongose object to DTO object in expressjs

I would like to parse objects from moongose result to DTOs for my views. I have a query example here, that return a result mongoose object: const returnedData = (err, result) => { //...
0
votes
3answers
14 views

NodeJS package.json

I'm setting NodeJS but when I run "connect", it says me that there is not "package.json". I've installed NodeJS -> $ npm install -g express-generator $ npm install express $ npm install connect $ npm ...
0
votes
1answer
8 views

How to make UDP based connection in node.js

In node.js documentation it is specifically stated that "Class: net.Server# Added in: v0.1.90 This class is used to create a TCP or local server." Is it possible to create a UDP based connection ...
0
votes
0answers
3 views

Sails blueprints lificycle

I need to add some additional data to result of find blueprint. I found this solution: module.exports = { find: function(req, res) { return sails.hooks.blueprints.middleware.find(req, res); } ...
0
votes
1answer
8 views

Error while testing login API in Node.js

I'm getting an error during testing the login API POST /api/login 404 2.774 ms - 23 app.post('/login',function(req,res){ User.findOne({ username:req.body.username }).select('...
-1
votes
0answers
9 views

How to tie two user by socket.io?

Each of others can subscribe each to each. One user connect to server and sends there data. Another user should conenct to server also, and get data from first user. The assuming scheme is: User 1 ...
0
votes
0answers
12 views

Templating soap request in node.js 0.10.4

What is the easiest way to template xml soap request string in node? Unfortunately I have to use version that doesn't have string interpolation feature. For example I want to dynamically put price ...
-1
votes
1answer
27 views

Referenece error $ is not Defined

After having a look through some of the question on here and testing some of the given answers i still cant seem to get it working where am i going wrong haha (Code Below) src="http://ajax....
0
votes
0answers
7 views

Laravel 5.2, Send notifications to browser and mobile devices

What is the best way to implement chat like application in Laravel 5.2 (Actually it is not a chat, it is working with api calls and send notifications to browser and mobile devices) using Socketio ...
0
votes
4answers
22 views

Unable to push data into current object inside mongo database

I am using mongodb native and Node.js 6.5.0. I have user object in mongodb which is structured as: { "_id" : ObjectId("57d7d294d96a73d128c46db9"), "id" : "105862592064", "labels" : [ ...
1
vote
1answer
6 views

Node Js soap package

I am using node soap package and trying to call a WSDL function by sending request to it. The function is working fine when I tried it through SoapUI client. I want to execute it through my node ...
0
votes
0answers
13 views

How should I get acknowledgement in WebSockets when my internet connection is lost?

Here in the server endpoint I need to call the onClose method when the web browser is closed abruptly, i.e. when I remove the LAN cable, I need to get an acknowledgement saying that the client has ...
1
vote
3answers
61 views

how to send json format to server

I wan the data to be in this format {"email":"[email protected]","password":"1"} but getting in this format { '{"email":"[email protected]","password":"1"}': '' } my client code, headers.append('Content-...
0
votes
0answers
11 views

how to read directory(nodejs) and send it to frontend(angularjs)

I'm trying to read directory that has some image files from Node.js and utilize the data in angularjs but I'm not sure my readdir is correctly working. here's my server.js code 'use strict'; const ...
0
votes
0answers
14 views

$http.put is not responding anything in angular.js, node.js Api

I am creating restful API using Node.js. and consuming API with Angular. Everything is going perfect. But data is not updating with PUT method. app.put('/contactlist/:id', function(req, res){ var ...
0
votes
1answer
18 views

load lua script from another lua script

I have written some lua script for my node.js project. but some of my lua scripts has same code in it. let me explain first. my first script returns all the data from given key from redis. script1....
0
votes
1answer
8 views

response status change not working on connect for nodejs

On connect res.status(400).send('wrong'); is not working. How can i make the status change for the response to 400?? Is there any other way to do it on connect.
0
votes
1answer
12 views

Will db.createCollection in the following code always set up a new database?

I have the following piece of code in my server.js file in a Node workspace. My question is, every time I run my server.js file from the bash command line, am I setting up a new collection called ...
0
votes
0answers
8 views

“npm publish” not working in Team City

I am trying to use Team City CI to run tests and publish the NPM package to local sinopia repository. I had setup sinopia repository on a server and i can successfully publish npm packages to that ...
1
vote
2answers
20 views

NodeJS MongoDB Pass parameter in the aggregation pipeline

How to pass an parameter to the aggregation? I'm getting the params and trying to pass it using $match operator but query returns empty array: app.get('/api/:name', function(req, res){ var ...
0
votes
1answer
10 views

Concurrent access to msg/payload on split flows in node-red?

I'm working on a node-red flow and came upon some (hopefully not real) concurrency problem. I have a node outputting a msg.payload, that on one connection is written to a database. The database ...
0
votes
0answers
10 views

When to call next() in node.js when using Firebase to fetch data

There is probably an easy solution to my problem, but I cannot seem to wrap my head around the problem. The problem is: I am using node.js with the express.js framework for an app I am creating. I ...
-1
votes
0answers
7 views

I'm not able to upload files with this nodejs - angularjs application

I tried out this code to create an application, to upload files, but somehow the files aren't getting uploaded. When I do log req.files, it prints undefined. It logs posted successfully, after ...
0
votes
1answer
29 views

nodejs how to use promise output in other file and modify it and then return its value

I have code in one of my file like below: this.xmlObjectRepositoryLoader = function (xmlPath){ var innerMap = {}; var elementName; var filePath = xmlPath+'.xml' var ...
1
vote
1answer
10 views

Will running Node.js scripts as CRON jobs without closing database connection eventually kill all the RAM?

I am building Node.js scripts that will be ran as CRON jobs. (full terminal scripts). These scripts fetch data from all around using APIs and MongoDB (native driver) is used. I don't didn't use db....
0
votes
1answer
10 views

meteorjs - admin users like django

someone know one package or one tutorial to make admin users like django? i'd like create superuser with terminal and on admin pages create users but i'd like create personalization users with schema ...
0
votes
1answer
9 views

How to use IS NOT NULL in Knex JS

I am trying to create the following query using knex: SELECT * FROM users group by users.location having users.photo is not null as follows: knex("users").groupBy("users.location").having("users....
0
votes
0answers
37 views

Javascript/Typescript Constants with a WebPack called twice

I have a constants file: collections.ts import {Mongo} from 'meteor/mongo'; import {Chat, Message} from 'api/models'; export const Chats = new Mongo.Collection<Chat>('chats'); export const ...
-1
votes
0answers
8 views

socket emit within a function server sided event

is it possible to use the socket.emit in any of my functions? without the need to handle all sockets in one place? What im looking for is to emit. structure: https://github.com/meanjs/mean for ...
0
votes
2answers
35 views

How to get post parameters in Node.js

I am not able to get the post parameters in my node js ,when I put console it says undefined but when I post parameters from postman it is working.Can anyone suggest help, please? exports.login = ...
0
votes
0answers
8 views

How to access inner object in keystoneJS

Say I have a model like University.add({ university_id: { type: Types.Number, required: true, initial: true, index: true, unique: true }, name: { type: Types.Text, required: true, index: true ...
1
vote
0answers
7 views

Paypal payout getting Response Status : 503 when using paypal-rest-sdk in Node js

I am using the npm paypal-rest-sdk in that calling the payout api. I am sending the body like email and amount for that.When I am calling that api/payments it gives the error like Response Status : ...
1
vote
1answer
11 views

Swagger res change status

I couldn't change the response status when an error has occur i tried like res.status(404).send(err); but it's not working. It doesn't change the response status
2
votes
1answer
13 views

Babel transform-async-to-module-method to Bluebird with ES6 maps

We're trying to use Node.js 6.5.0 with Babel to make async functions use Bluebird instead of native V8 ES6 promises: Our package.json contains only the following Babel entries: "devDependencies": { ...
0
votes
0answers
20 views

How to Access Meta Description of a website with Node.js

I am trying to access all meta description from a website with Node.js. how will we acces this. crawler.discoverResources = function(buffer, queueItem) { var $ = cheerio.load(buffer.toString("...
0
votes
0answers
5 views

How to send notification using sockets and node js onclick of link in web application runtime

I want to send a notification to a page in runtime onclick of perticular linked searched, where the web page should open in runtime. I have saved user logged in and socket id into mongo db. Every ...
0
votes
0answers
13 views

Dynamic file path in require with webpack?

This works fine when i manually request the file using require, however the moment i use the exact same request, but change the string so that it's split up with variables it fails. This works great: ...
0
votes
0answers
4 views

How to include node-sass in nwjs (on windows)

I'm working on a multi-platform project in NW.js (node-webkit) and it has to use node-sass. The problem is that I can't seem to find any way to include it without an error on windows (x64). Here's ...
1
vote
1answer
16 views

Data is been sent from client but not reached in server angular2 and nodejs

I am trying to post my form data to server(node) but it is not getting reached there when i put console to data in backend it says undefined.Data is been sent from client but not reached in server.I ...
0
votes
0answers
12 views

Uber API - HTTP Response with error code: 409

I'm using the Uber API to create a ride request (with node-uber) I first get the user authenticated. Then I call the estimate API and get a response. I then use the same start & end ...
0
votes
0answers
8 views

Best way to store answers from users in Facebook bot chat?

Building a Facebook messenger bot using Claudia JS and plan on hosting on AWS Lambda. I want to ask the user a series of questions. When a user responds with an answer, I need to save that for ...