Tagged Questions
Node.js is an event-based, non-blocking, asynchronous I/O framework that uses Google's V8 JavaScript engine.
0
votes
0answers
4 views
Using (and reusing) multiple mongoose database connections on express.js
I'm looking for the easiest & performant way to make a multitenant express.js app for managing projects.
Reading several blogs and articles, I figured out that, for my application, would be nice ...
2
votes
0answers
5 views
RethinkDB: Determine if their is a next document in result set
With the RethinkDB JavaScript driver, is there a way to determine if there is another document available while within a "cursor.each" or a "cursor.on('data')" event?
Via each
...
1
vote
1answer
9 views
Collection.find() for array inside object
I have a Meteor app that has a collection of chat groups. Each document in this collection looks like this:
{groupname: 'name', whitelist: ['person1', 'person2', 'person3'], messages:['message1', ...
0
votes
1answer
6 views
How do I return a string from a Buffer from a mysql blob field in my Express API?
I'm building a restful API on Express and using Sequelize. I have a Blob field in my mysql table, but in the get response it's returning a Buffer object. How should I return the string value of any of ...
0
votes
0answers
6 views
Node.js server + SSL = ERR_CONNECTION_CLOSED
I've got an node.js app which was running perfectly on http.
Then I added self-signed cert to buildup and test ssl connection.
When it worked out (with chrome notify that somebody could steal ...
0
votes
0answers
8 views
How to debug failing xmlhttprequest
I am trying to retrieve data from a database on my server to use client-side. It is failing without appearing to actually throw any errors and I can't figure out how to debug it.
My server is written ...
0
votes
1answer
10 views
Handle schema references on mongoose
I'm trying to define a simple RESTful API using Node.js, mongoose and restify. The goal is to have users which can comment on profiles of others users. For this I have a comment endpoint that receives ...
0
votes
0answers
4 views
Node.js process hangs on SIGTERM if a DNS resolution is in progress
I am using node 10.38 on Linux (Ubuntu 4.10, FC20, etc...).
I have some code in startup which looks like:
process.on('SIGTERM', function() {
process.exit(1);
});
process.on('SIGINT', function() {
...
0
votes
1answer
12 views
How to use Requirejs-handlebars with Grunt-contrib-requirejs optimizer?
I'm currently using the Grunt-contrib-requirejs optimizer so that my final package structure looks essentially like this:
Public/
css
js
-myapp.js
-require.js
I'd like to use ...
-3
votes
0answers
12 views
streaming facebook profile activity
is it possible to stream a users profile activity with the facebook api from a server. and are there any limits?
-1
votes
0answers
10 views
How to make post https request using request module in nodejs?
I want to send headers, body, and via post to https. And upon response do something.
I'm using this code and i keep getting error undefined, or function undefined:
var request = require('request');
...
0
votes
0answers
11 views
To Send Variable in Callback vs. Not to Expose Object properties
I've got 2 different ways to code the World function. The first is an example from Cucumber.js's website. This is extending their existing World object basically. And the second example commented ...
-1
votes
0answers
25 views
How to create a GUI for Java without using Swing [on hold]
For reasons beyond the scope of this question, am looking for a simple way to create a front-facing GUI for a JavaSE application without swing. A couple of things have come to mind,
Tomcat server ...
-1
votes
0answers
13 views
How to unit test Node.js command line script
I have script written in JavaScript (Node.js) that is meant to be run from command line, e.g.: node myScript.js
Script uses some internal modules (fs, http) and can be configured via command line ...
0
votes
1answer
19 views
UDP communication varies depending on implementation language
Introduction
I am interested in multiplayer games that communicate via UDP but don't need any port forwarding. So I am trying to achieve this with an own implementation.
I don't need a peer-to-peer ...
0
votes
1answer
22 views
Handling Server Load and Search with Node.js and Mongodb
Forgive the ambiguity of this post but I am new to node.js and backend development in general. I and a small team are working on a fairly feature rich web application and have chosen to go the NoSQL ...
1
vote
1answer
20 views
node-restful GET query string for querying a sub-entity
Using Node + Express + Mongoose + node-restful
https://github.com/baugarten/node-restful
The problem i am facing is filtering sub-entity data.
Model Schema is defined as follows for node-restful
...
0
votes
1answer
18 views
Get value from input in NodeJS
I want to get value from a form:
Here's the form:
<form method='post' action='/stack'>
<input name="stack0" value="stackoverflow0"/>
<input name="stack1" ...
0
votes
0answers
18 views
How to make changes to a Javascript object from Node.js/Socket.io listener?
Sorry if the title is too vague, I'm not really sure what the problem is here.
I am attempting to make a basic program which allows users to start and join rooms. When the start button is pressed, a ...
0
votes
0answers
5 views
Node & Redis Application Error on Heroku
I am new on Heroku & Node so please bear with me. I deployed my working chatting app(on localhost) to Heroku but can't open the Heroku app.
Can anyone help me how to fix this issue?
I looked ...
-1
votes
1answer
11 views
Failed to load c++ bson extension while trying to load in mongoose [duplicate]
for the below code, i am getting an error:Failed to load c++ bson extension
var mongoose = require('mongoose');
mongoose.connect('mongodb://jer:[email protected]:61621/trial100');
any ...
0
votes
1answer
10 views
node-sqlite3 with iojs, koa and yield
I'm new to iojs and am trying to write a small web application with koa and node-sqlite3.
One thing I couldn't quite get my head around is how to use the 'yield' syntax on the node-sqlite3 callback ...
0
votes
0answers
10 views
SetAccessor functions not being called in C++ module for Node.js using NAN
I'm trying to make a module in C++ for Node.js. I got the module set up and working, and Node.js sees the module no problem. It can be initialized and deinitialized and all of the code seems to be in ...
0
votes
0answers
10 views
NodeJS: if ('closed' != this.readyState && this.transport.writable [on hold]
Sometimes my application halts with the error:
/usr/lib/node_modules/socket.io/node_modules/engine.io/lib/socket.js:328
if ('closed' != this.readyState && this.transport.writable
^
...
0
votes
1answer
17 views
Asynchronously Write Large Array of Objects to Redis with Node.js
I created a Node.js script that creates a large array of randomly generated test data and I want to write it to a Redis DB. I am using the redis client library and the async library. Initially, I ...
0
votes
1answer
8 views
Making Google API calls to only one user
I'm writing an in-house app and we're using some of the Google API's in Express/node.
Since I'm only going to use one google account (an email I made just for this purpose), what's the best ...
0
votes
1answer
13 views
How to handle a get request with node.js (express)
I'm a node.js newbie and I'm creating my first big app with it (I'm using express). I need to have my webpage perform some javascript canvas-drawing when the user loads an id with a get request, e.g.
...
0
votes
0answers
9 views
OAuth 2.0 user login and server to server authorization
I'm having a hard time finding any information on how i would go about structuring my API authorization with or without the help of OAuth 2.0.
The infrastructure I'm attempting to set up involves a ...
-3
votes
0answers
21 views
What Framework for creating Models in Node are there?
Is there a Javascript model-building framework I can use with a type system? I'm using Backbone.Model, and I find it just sucks. I have a lot of problems with it.
I want
A type system to specify ...
0
votes
2answers
11 views
Require controller, factory, service and directive files with Browserify
In my gulp-browserify setup I'm writing a new AngularJS application. Because I know it's gonna be a very big application I want my base structure as clean and clear as possible.
In my main entry ...
0
votes
0answers
23 views
Trying to pass <%> HTML Variable to Javascript - Node, Passport, and Stripe
A bit of a newbie here. I've been looking for an answer that works and found some similarities in a Jade problem but I'm not using Jade. I have passed an "user" attribute into an HTML view as so:
...
-4
votes
0answers
26 views
Can you send POST response, in reponse to GET request?
So i'd like to send some information that i'd not want to be bookmarked. However, browser by default makes a get request is there a way to send post response even though user made a GET request.
I ...
-1
votes
0answers
19 views
How to render a page in application by clicking a link in email using node, express and angular
Working on a website using node, express and angular JS.
I send mail through my application, which has a button with a hyperlink.
Example link: http://myweb.com/navigates?id=12345
On click of this ...
0
votes
1answer
20 views
MongoDB with Node.JS: $where clause performance
I'm not using mongoose but the official MongoDB driver for Node.js since it doesnt enforce defining an schema.
I read on the official documentation that with the $where clause you can make queries ...
-1
votes
0answers
10 views
How to get .docx page count in NodeJS?
I need to know how many pages long is .docx document. For .pdf I found this package: https://github.com/Gottox/node-pdfutils. Looking for something like that, but for .docx.
0
votes
0answers
17 views
Asynchronous virtual using mongoose
I'm trying to get the number of tickets remaining for an event by comparing the the number of order rows/documents with a ticket id and taking that away from the maximum number of tickets available.
...
-2
votes
0answers
10 views
Updating a file with mongodb gridfs and nodejs
I have implemented a function that exposes a server side api to update a file in mongodb gridfs:
Database.prototype.updateFile = function(fileId, updatedContent, success, failed) {
var that = this;
...
0
votes
0answers
9 views
fetch app details of uploaded android app from web
I am working on web project which uploads android application and list out the same. I need to get the app details like version, name and size. How could I do this using angularjs and nodejs/express
0
votes
1answer
19 views
Passport.js always returning 500 internal error
I am trying to build a very simple authentication api using passport.js, but I my code always returns 500 internal error status.
var express = require('express');
var bodyParser = ...
1
vote
1answer
12 views
how to MEAN hosting
I'm having trouble understanding how the whole hosting for MEAN applications is done. If I want to use openshift for instance to host it.
I understand that it hosts the nodejs webserver and the ...
0
votes
0answers
15 views
Need help installing node-dev
I am new to node.js and I am trying to install node-dev. Everytime I try to install I get his following error message:
npm WARN deprecated [email protected]: Please update to the latest object-keys
...
1
vote
2answers
20 views
Nodejs seems to be not working; npm do work, however
I was running Node.js and Node-RED (depends on Node.js) normally one week ago. My system is Windows 8.1 64 bits.
Nevertheless, today I am having a issue:
As normally, I go to the node-red folder, ...
0
votes
1answer
15 views
Why does my websocket close after a few minutes?
I'm using ws with node.js on the server side and the regular WebSocket API on the client side. Opening the connection and messaging a few times back and forth works fine. But the socket always ...
0
votes
2answers
30 views
response.write doesn't work node.js
I'm confused a lot. I receive POST data from browser, parse it and insert it in mysql. Everything works perfect, except the response to client after i inserted data. Response object is visible and it ...
0
votes
1answer
14 views
Communicating with a background task in node
I have a task running in the background (downloading a large file from somewhere).
I need the client to be able to make an HTTP request and wait till the status of the task gets updated (for example, ...
0
votes
1answer
18 views
How to determine current number of iteration in callback (nodejs)
Here is the code for nodejs. If I log value of variable "i" in response.on("end") callback, then it prints number "2" three times. I don't get why.
var http = require('http'),
urls = [],
...
0
votes
1answer
16 views
How I handle the swig and markdown
I was using Express and swig to do my project. I want to add the "markdown" to my project editer. But there is some conflict happened.
For example: in the views, I use {{ title }} in the index.html. ...
0
votes
0answers
17 views
Javascript-enabled crawler to download .pdf files from a website
I want to download all .pdf files accessible on http://trai.gov.in/Content/PressReleases.aspx .
I intend to use node.js and Cheerio and for this. I have the JavaScript code to download pdf files, ...
0
votes
0answers
36 views
How can i copy the audio data from a wavesurfer region into a new audio buffer?
Wavesurfer.js is great, but a little bit confusing.
I have wavesurfer implemented, but i want to build a way of cutting out the audio region the user selects and pasting it into a new audio buffer. ...
0
votes
1answer
22 views
Streaming data and writing to MongoDB
Just started investigating streaming data from one server to another. I'm using REQUEST and I have been able to PUT data from a file to another file on a separate server like so:
...
push: ...