« first day (9 days earlier)      last day (68 days later) » 

12:01 AM
0
Q: Async problems in Node.Js - how to perform a sequence of actions?

deemeetreeI need to perform a series of actions on a variable, where the output of the previous action would be the input of the next one. Also, there is a possibility that at each step the whole process aborts in case the input is not well formed. I know this could be done with the callback functions, b...

 
12:19 AM
0
Q: How to launch exports.function in Node.Js

deemeetreeIn the routes folder of a Node.Js app I have a file entries.js which has the following function: exports.form = function(req, res){ res.render('post', { title: 'Post' }); }; Is it actually possible to launch something like this from another exports function in the same file, such as: ex...

 
12:46 AM
0
Q: Advice on creating a multi-tenant SAAS App with MEAN Stack (Mongodb, express, angular, node)

Daniel WhiteI am trying to wrap my head around developing an SAAS application with MEAN stack rather than PHP and MySQL. I need advice on a good way to create a multi-tenant application with mongodb. I know from previous reading that I don't want to do one database per customer because of the large size of a...

 
 
2 hours later…
2:30 AM
0
Q: Logging stdout and stderr of node

rajuI am using boiler plate code of mean.io and starting the server with command node server.js How do I log stdout and stderr of my express application? Following is my server.js 'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), passport = require('passport'...

 
2:46 AM
0
Q: Viewing Node.js code

SoubriquetI'm new to web development. I'm writing an application with Node.js and want to use MySQL. I'm not sure how web technology works, but would people visiting my site be able to see my database credentials? According to the MySQL documentation (https://github.com/felixge/node-mysql) this is how to c...

 
3:33 AM
0
Q: node module gitignores its own node_modules directory, breaking Heroku deploy

o_o_o--I'm using the aws-sdk module, which has a .gitignore file that ignores its own node_modules directories, breaking my Heroku deployment. Is there a proper way to deal with this sort of situation? When I heroku bash I see that the dependencies are missing from aws-sdk it has no node_modules direc...

 
4:06 AM
0
Q: How do I enforce a check for a particular sequence of parameters in the querystring of an http request handled by a node.js server?

peripheryFrom node.js documentation querystring.parse('foo=bar&baz=qux&baz=quux&corge') // returns { foo: 'bar', baz: ['qux', 'quux'], corge: '' } When I parse for the parameters on the server side, is there a way I can check if these parameters are sent in a correct sequence? For example, I want to ...

 
4:30 AM
0
Q: How to save user data from a get route

HelloWorldI am unsure how to tackle this problem or what a common practice is for doing this. I am creating a bit.ly clone for a learning project and want to collect a users ip address and referer link before I route them to the original url. Here is my current get route: router.get('/:custom_url', func...

 
 
2 hours later…
6:26 AM
0
Q: How to query documents by Date in MongoDB?

ErikMy events colleciton stores the following documents: { "_id": { "$oid": "537b2a232a47f21830ae5b7b" }, "startTime": { "$date": "2014-05-18T21:00:00.000Z" }, "endTime": { "$date": "2014-05-18T23:00:00.000Z" } }, { "_id": { "$oid": "537af8136c4162d0379e2139" },...

0
Q: async.eachSeries in node.js

Or SmithI have a loop in node.js for (var i in files){ var all = fs.readdirsync("./0"); async.eachSeries(all, function(item){ check(item); } } The check(item) has a callback to other function. As I see, the async.eachSeries doesn't execute synchronize. the loop continue to execute...

 
6:52 AM
0
A: async.eachSeries in node.js

SomeKittens Ux2666Assuming check accepts a callback, we can use mapSeries to achieve that. async.mapSeries(files, function(file, outerCB) { var all = fs.readdirsync("./0"); async.mapSeries(all, function(item, cb){ check(item, cb); }, outerCB); }, function(err, results) { // This is called when ever...

 
0
Q: How to push notification to browser using node JS

KhalidI follow this sample code to push notification to browser, I follow the instructions and run the app using node server.js and I open the browser and run localhost:8000 and change text in example.xml and save it then the text pushed to browser. But I still don't get it to implement to another app...

0
Q: Instantiation of Elasticsearch client in Nodejs

Rohit TanejaI am using a Nodejs app with npm module- elasticsearch. Should I instantiate Elasticsearch client every time I make a call to an ES API or should I create only 1 instance of ES client and use it for every request or should I use a mix of the above and what's the difference between them.

0
Q: connect ECONNREFUSED in NODEJS

user2519788I get an error when I run file example4.js that test another file example3.js. This is my code: **//file example 3** var http = require('http'); var fs = require('fs'); // write out numbers function writeNumbers(res) { var counter = 0; // increment global, write to client for (v...

0
Q: Axis-aligned lines intersection

user2715488I am writing a tron like game in html5 and javascript. I need to check if two line segments that are both axis aligned intersect. I can do that through a lot of if-else conditions, but is there any simpler algorithm? Thanks for help.

 
7:25 AM
0
Q: fetch mongo documents updated within last 30 minutes

KokaI want to fetch documents updated within last 30 minutes each document has updatedAt field of Date type I am doing the following : Model.find({ updatedAt : { $gte : new Date(Date.now() - (30 * 60000)) } }, function(err, docs){ console.log(err); //null console.log(docs); //empty a...

0
Q: How set default time in mongoose on specific timezone?

ErikI use mongoosejs as driver to MongoDB server. I have the schema that have date field: time : { type : Date, default: Date.now } But I need to store datetime in specific timezone instead current server. How could set default time in specific timezone?

0
Q: node.js+serialport receiving undefined error when writing to serialport

narsiGuys I'm getting error when I try to write information into serial port. I din't get any compilation errors as you can see in the result below. But When I write using serial.write(); I get error as undefined. connect.multipart() will be removed in connect 3.0 visit https://github.com/senchalabs/...

0
Q: Errorhandling using express.csrf()

nofear87I have some Questions about using CSRF protection. When I use a "post" route without a valid csrf-token i get a "Error: Forbidden at Object.exports.error ....", Is it possible to redirect request without a valid token to a special route? Here is my code: app.use(express.csrf()); app.use(functio...

 
7:56 AM
0
Q: How to store datetime on server side in nodejs?

ErikMy users could create some objects that have specific time and search them by query for specific startTime and endTime. My question is how should I store these objects in my database (MongoDB)? Should I store them in UTC or with specific timezone that relates to user that create object?

 
8:10 AM
0
Q: Windows 8 : `node-gyp rebuild` Exit status 1 installing contextify as dependency of zombie

user3675534I'm trying to install zombie js, and get this error: > contextify@0.1.8 install C:\Users\User\Documents\ArbeitPhilipp\clieman\billing\node_modules\zombie\node_modules\jsdom\node_modules\contextify > node-gyp rebuild Das System kann den angegebenen Pfad nicht finden. C:\Users\User\Documents\Arb...

 
8:38 AM
0
Q: How to get timestamp from date string with locale timezone

Running TurtleI have to parse json items with a date field formated as follows: 'Wed, 14 May 2014 20:19:00 BST' How can I get the timestamp from this kind of string ? Constructing a Date object doesn't work as it gives me an "Invalid Date"

0
Q: Duplicate messages when sending to multiple rooms with Socket.io

koenWhen I send a message to multiple rooms, and some socket connections are subscribed to more than one of these rooms, they receive the message multiple times. For instance: ['room1', 'room2', 'room3'].forEach(function(room){ io.sockets.in(room).emit("statusChange", {user: 'user1', status: 'o...

0
Q: Test Grunt served pages in Virtualbox

kimblimI'm developing some HTML-files using a lot of different libraries, but everything is compiled and served using grunt ('grunt serve'), which fires up my default browser and connects on 127.0.0.1:9000. I can copy/paste that URL into other browsers on my OS (Mac OS X) with no issues. However, I als...

0
Q: Express EPIPE Error

leaksterrrI have created an image upload script using Express which is working fine. The problem I'm having is that I'm trying to do some server-side image manipulation with GraphicsMagick for Node but in each of the solutions below containing gm, I'm getting EPIPE errors and I don't know how to fix this s...

 
8:55 AM
0
Q: Juggernaut - how can i detect event disconnect

Alex - QuangRauI'm using Juggernaut with (PHP + Redis + NodeJS). On the client side, how can i use callback function when the channel has disconnect? I've trying: var socket = new Juggernaut(); socket.on('disconnect', function() { $.post('/test/user-leaving', function(res) { //do som...

0
Q: Refactoring / Elegant way for loop inside loop

Or SmithI have 5 loops, one inside the other: for (int k; k< files.length; k++){ var subFiles = files[k]; for (int t; t<subFiles.length; t++){ call(files[k], subFiles[t]); ... and so on } } is there an elegant way to do it? I think about recursion, but I am concerned about...

 
9:12 AM
0
Q: How to execute code from Node.js server command line?

JazzaI'm just starting with Node.js but I have experience with client-side JavaScript and PHP/Apache. In your browser you can execute JS code from the developer console at any time. You can manipulate global vars and call global functions and methods. If I call console.log('Hello world!') from the br...

0
Q: Docpad performance issues

Philipp KellerI'm migrating my tumblr blog to docpad and have started with this boilerplate: https://github.com/ervwalter/ewalnet-docpad Now my problem is that "docpad run" takes 58s to run, and a livereload run takes 23s. I wrote the author of this boilerplate and he says he is having the same, but it doesn'...

0
Q: redis - sadd returning wrong result

Manish SapkalI have written following code in my node.js application for inserting key/value in redis as follows. redisCli.sadd(keyName, keyValue, function (err, success) { //When I have inserted first time, result (e.g. success) is showing 0/false. //why ???? }); As per redis documentation, If...

 
10:21 AM
0
Q: Semver with node.js in jenkins with custom shell variable

digga_miestrying to get the semver commandline utility from https://github.com/isaacs/node-semver working with the jenkins execute shell build step. When I want to use the commandline utility with a custom created variable, the build step fails because semver doesn't accept the variable as input. Example...

 
10:33 AM
0
Q: Listening on two ports in the same app in node

Asa CarterI am using socket.io on port 8081 and express with redis on 8080. I cannot use both on the same port or I get a conflict. When the code below is run the php session is logged in the console and I get the socket.io started message but there is nothing further from socket.io logged to console. I'...

0
Q: Not able to create java calendar object in Node.js using java utilities in node.js

user3458261This is my piece of code to create java calendar object in Node.js using node-java module. var java = require("java"); java.classpath.push("commons-lang3-3.1.jar"); java.classpath.push("commons-io.jar"); java.classpath.push("common-util.jar"); var vehId = java.newInstanceSync("java.lang.Integer...

 
10:44 AM
0
Q: Why does npm update -g show warnings about unmet dependencies?

h2oI just ran sudo npm update -g and the output contained warning messages about unmet dependencies. Here's an excerpt: npm WARN deprecated grunt-bower-install@1.6.0: use grunt-wiredep instead strip-ansi@0.1.1 /opt/local/lib/node_modules/bower/node_modules/chalk/node_modules/strip-ansi intersect@0....

 
11:08 AM
0
Q: Yeoman command yo not working in windows 7

Anil DukkipattyI have installed node and npm. After which I installed yeoman using "npm install -g yo". Later I installed webapp generator using "npm install -g generator-webapp". Now that everything required was installed I used "yo webapp" command" and "yo" command. Both failed giving me this absurd message ...

0
Q: How to count by programmatic way the quantity of child XML nodes within parent XML node using C# and WPF?

user1688773I bag your pardon. May be I'm ignorant, may be I'm boor and I can't ask correctly on StackOverflow but I have nowhere to go and implore you to help me. I write a WPF application which is two-level master-details and uses XML file as data source. Data from this file is displayed in application mai...

 
11:27 AM
0
Q: node.js server call not responding on Windows Server 2008

CindyI created a node.js application which runs fine on 2 laptops. Now I want to install it on a windows 2008 server. I copied the files, installed all programs needed (express, mssql). I can start my server, which goes well. This is the code for starting the server : var server = app.listen(3000, ...

 
11:46 AM
0
Q: Mongoose unspecified sub document

IneenthoI am trying to defined an account model in Mongoose. This is how I would like to have it set up (very simplified, would need unique index among other stuff as well): var accountSchema = new Schema({ username: {type: String}, email: {type: String}, auth: {} }); and then have several...

 
11:58 AM
0
Q: How to combine 2 encodings

user3603880I am using a node.js chat server which sends ASCII messages containing the id of the users and unicode messages as text messages. How can I determine the type of encoding in the C# client? As server-side I am using node.js with "net" module.

0
Q: (Token-based A&A): send the token on every request to the server

user3340132I am debugging a token-based A&A module in node.js + angularJS. In this approach, server authenticates the user and responds with a token. This token is saved in a local memory (client side) and user sends the token on every request to the server using the attached code. However, I face a weird...

0
Q: How to declare variables in DUST?

ManuI have a javascript code to declare a variable. i need a way to do the same in DUST?? <script type="text/javascript"> String flag = "ON"; </script> how to do this DUST???

 
12:22 PM
0
Q: Use Domain in Expressjs 4 for NodeJs

UnoSparkIn expressjs 3 I could do var port = process.env.OPENSHIFT_NODEJS_PORT || 8080; var domain = process.env.OPENSHIFT_NODEJS_IP || "127.0.0.1"; http.createServer(app).listen(port, domain); in express4 var server = app.listen(app.get(port), function() how do you add domain in expres...

0
Q: Updating a document with mongoose

GoranI got a small problem. With this code I updating a existing document in mongodb using node.js and mongoose router.route('/profile/:profile_id/:session_key') .put(function(req, res) { if (req._body == true && req.is('application/json') == 'application/json' ) { // Get the ...

0
Q: how to use css in jade?

Chopper Leei use the link word as told, but still can not see the css file invoke successful. app.js var express = require('express') , cons = require('consolidate') , jade = require('jade') , path = require('path') var app = express() app.engine('jade', cons.jade) app.set('views',__dirname)...

0
Q: Accessing session from within socket.io

John SmithIs it possible to access and modify session variables from the socket.io level? Like req.session.variable = 5

 
12:33 PM
0
Q: Meteor: storing data in mongodb collections overlap

RonioRight now I'm working on a project in which I'm requesting an API server and the responses from the server are stored in seperate mongodb collections but issue is that responses' data get overlap and both collections have merged responses' data stored in them. The logic which I'm using for doing ...

0
Q: Best practice for unique IDs in Neo4J and other databases?

deemeetreeCurrently in my Node.Js app running on Neo4J I use node-uuid module for giving unique IDs to my database objects. Using uuid.v1() function from that module I get something like 81a0b3d0-e4d0-11e3-ac56-73f5c88681be Now, my requests are quite long, sometimes hundreds of nodes and edges in one...

0
Q: Node server started but i can't access it trough my IP on centos

user3510335I've started node server with forever forever start server.js I verified it with forever list and also with opened the 3000 port in iptables and made sure that the port is open and listening with nmap. So node is runing and the app responding but i can't access it trough my ip xxx.xxx.xxx.xxx:...

0
Q: Console.log does not output the array I just set

Tim KI'm learning Javascript / Node.JS and it's going well but I ran in some trouble with the code below. When I open the page that emits a hit it outputs the trck_visitors array in Node.JS however. On the first hit this array is empty, it does not show the trck_visitors[socket.id] which I just set. I...

 
12:57 PM
0
Q: Creating Multifield(more than 2) Indexes in Mongoose / MongoDB

J22MelodyI see solution here: Creating Multifield Indexes in Mongoose / MongoDB How about 3、4、5... fields?

 
1:18 PM
0
Q: Modify req.body and res. parameters in Node.Js / Express app

deemeetreeThere is a part of my script where I need to use a function, which takes req and res data as its variables. Is there any way to populate them without actually having to submit a form, something like req.body.entry.body = 'this is a test post about things that are apples'; and res.l...

0
Q: Is it possible to make nodejs execute some code after it has been launched

arachideIs it possible to make nodejs execute some code after it has been launched. After Node.js started, I hope it can loads some code interprets and executes them. Is there any module can do this? Your comment welcome

 
1:43 PM
0
Q: MySQL With Node Express, UPDATE using a Map

guy_mSo I have a table of users which includes the columns 'user_id' and 'points'. Now, I want to update multiple rows using the Map/Array [{id: 1, points: 2}, {id: 2, points: 4}, etc...]. And another problem is, I want to ADD to the points values, so building a query-string using a for loop is somew...

0
Q: dc charting with node.js

ensamgudI am trying to use the dc charting package with node.js. Just getting a very basic pie chart (with hard coded data, etc) to work seems to be quite challenging. I tried following the only guide I found for node: dc.js with node.js server side basically it uses jsdom to construct a DOM and place ...

0
Q: How to run node js application programmatically using forever

Karthigai muthuI need to run the set of node js files which contains the configuration information where It has to run typically port number and IP address then using the forever in node.js I need to run the script in the terminal with the configuration without having any manual input.

 
2:02 PM
0
Q: Error when compiling node.js

DanFromGermanyI downloaded the git repo from the official link, git clone git:// and I ran ./configure && make && make install where the make install returns with error: LINK(target) /usr/local/bin/node/out/Release/node: Finished touch /usr/local/bin/node/out/Release/obj.target/node_dtrace_header.stamp...

1
Q: Concerns about separating front-end and back-end with a NodeJS UI server

carlesDuring the last months, we at work have been looking for a solution to the following problem: front-end developers can't easily modify the appearance of the website without needing the help of back-end devs. Our culture as a team is mostly based on full-stack frameworks such as Symfony 2 and Rub...

 
2:14 PM
0
Q: NodeJS run tcp server on multiple ports?

user3490755Is it possible to run a tcp server in nodejs on multiple ports? var socketServer = net.createServer(function (socket) { socket.on('end', function () { }); socket.on('error', function (error) { }); return socket; }).listen(8080); Any ideas how the above could als...

0
Q: Connect to Google Cloud Datastore from nodejs (sencha)

sederoI am trying to connect to the Google Cloud Datastore using node.js and the data layer functionality present in the Seneca framework. The Seneca framework needs to create a connection to a database as per connecting to a database instance, passing information like: name: '', host: '', port: , use...

0
Q: Can't install couchbase on node.js

Or SmithI'm trying to install couchbase with node.js. I'm running: npm install couchbase and It give the following error: npm ERR! Error: EPERM, mkdir 'C:\Program Files\nodejs\node_modules\couchbase' npm ERR! { [Error: EPERM, mkdir 'C:\Program Files\nodejs\node_modules\couchbase '] npm ERR! errn...

0
Q: Email Piping with Express.js / Node.js

Daniel WhiteI am planning a web application that I would like to utilize email piping with. I am primarily a PHP developer, but I'm learning MEAN stack development with Node.js and Express to do this project. I have done alot of digging and can't really find any good tutorials or resources to figure out ho...

0
Q: Angularjs and Unity External Call

MaTI can't achieve an External Call using Unity. I am trying to call from Unity a simple js function like this. void Update() { if (Input.GetKeyDown(KeyCode.Space)) { RetrieveData(); } } public void RetrieveData() { Debug.Log("RetrieveData"); Application.ExternalCall("...

 
2:46 PM
0
Q: nodejs - know from which ip address the server makes the get

nkintSorry, I'm quite new to network programming and nodejs. I'm using nodes in a server with some clients in a local network. Sometimes I have to ask data to clients via get request: // somewhere inside server.js function askDataToClient(ip) { var options = { host: String(ip), ...

0
Q: Send a file base64 to a Node.js socket.io server

Cris_TowiI'm programming a game with socket.io drawing in an HTML5 canvas and when the time is over send the image to the node.js server. Is there some way to convert that canvas in an image, send the image in base64 to the node.js app, an finally save it into the server?

0
Q: Firefox sends triple request for the first time load of a page

user3676738I was practicing the below sample code. var http = require('http'); var count = 0; http.createServer(function(request,response){ console.log("request hit "+ ++count); response.writeHeader(200,{"content-type":"text/plain"}); response.write("Hello World"); console....

 
3:13 PM
0
Q: Callback undefined in process.nextTick

Errol DsilvaTrying to recursively call a synchronous function to parse a element of the array; once the last element of the array is reached the callback is to be called. But the callback is said to be undefined when passed to process.nextTick where as another variable declared in the same scope as the call...

0
Q: Connecting to a PHP website with Node.js and keep session

MichaëlI'm making a testbench with Test'em and Mocha (that run on node.js) in order to test a PHP website. What I want is to request some URL (e.g http://www.my-website/test.php) and get the http status code as well as the content returned. I'm doing it with the node.js Request module. The problem is...

0
Q: jade is not recognized as an internal or external command

Benjiko99I am trying to make a .cmd to compile my .jade files. I am new to node.js and jade, jade was installed with npm install jade --global and the cmd i am trying to use is jade jade --out ../MyApp ...which works when typed into the node.js command prompt.

 
3:56 PM
0
Q: nodejs + express file upload tmp name unique

just_userif I use post to upload a file to my nodejs server I get a temp that looks something like this: /tmp/22608-16eior5.jpg by using this: var tmp_path = req.files.postImage.path; My question is, would the name "22608-16eior5.jpg" be unique enough to be used as a unique filename for one folder ...

0
Q: Node.js module to receive audio streams from WebRTC peers

jpenI am new to Node.js. I am interested in using it with WebRTC in my project. I want to create a Node.js server to which remote peers connect and send their audio streams that are captured using getUserMedia (I then want to process the streams on my Node.js server). Is there a Node module alread...

 
4:26 PM
0
Q: Javascript: call method itself inside a method (with original parameters)

user3351722i develop a class to upload a file to imageshack. For this you have to do a authorization first to get a auth_id. Because of i use this in nodejs i don't want to create the auth_id every time i upload a image. For that i need something like this: function test(){ this.auth = ""; } // Callbac...

 
4:44 PM
0
Q: What is the difference between calling a node function (that returns a promise) directly vs using ninvoke

user3677016In the code below when i call using ninvoke the "then" part does not get executed. The result is as follows calling thru a function that uses ninvoke dbConnect --> Success: Connected to db! calling directly dbConnect --> Success: Connected to db! 2222222 - After Called Directly Why is that? ...

 
5:01 PM
0
Q: JQuery Slider Value sending via UDP (Node.js Server running)

Zettbasically all i want is to send the value of a slider via an UDP stream (in fact there will be several sliders and input fields, which have to gather the data from the slidersettings and then create one big UDP Stream (e.g "$Stream1,Val1,Val2,Val3...") I've looked around and couldnt exactly find ...

 
5:17 PM
0
Q: Is there a default timeout in nodejs for http.request

user3351722In nodejs there is a default timeout for server (incoming http-request) at 120000 (2 minutes) (see: http://nodejs.org/api/http.html#http_server_timeout) But if i do a http-request in nodejs (http.request) in the docs i only find a function (http://nodejs.org/api/http.html#http_request_settimeout...

0
Q: How should I connect an IRC bot and Meteor web interface?

MisutoWolfI've got a few questions here regarding Node, IRC bots, and Meteor. I'm part of a gaming community that's starting to deal with Twitch.TV streaming, and as such have been asked (due to my love of programming) to write a custom bot to moderate community streaming channels. My questions are these...

 
5:43 PM
0
Q: node.js: require returns an empty object

user3677173I have tired of asking google, and honestly would like to hear some sane answer. I got a folder, that has index.js and couple of models (classes) index.js module.exports = { Book : require('./book'), Author : require('./author') } book.js var Author = require('./author') var Book = mode...

0
Q: Massive CPU and memory usage

Christian StewartI have an app that sends a minimal amount of data to a very large amount of clients at any given time. Even with ten server instances on Modulus I'm getting 100% cpu usage and very high memory usage all the time. How can I minimize my Meteor app's CPU usage? I've read this question, however eve...

0
Q: Express sendfile() vs render()

SoubriquetI tried both res.render('index.html') and res.sendfile('index.html') and they both seem to be doing the same thing. I don't find the Express documentation very helpful. What's the difference between the two?

 
6:20 PM
0
Q: How can I stop the momentary redirect with the #_=_ on the url when using Facebook Oauth?

jcollumI'm using Passport and Angular to log in to a site via Facebook. Code looks like: facebookStrategy: function() { if (!process.env.FACEBOOK_APP_ID) { throw new Error("A Facebook App ID is required if you want to enable login via Facebook."); } if (!process.env.FACEBOOK_APP_S...

 
6:46 PM
0
Q: Get rest of the path from requested route in nodejs

AliCan you get the rest of the path in node.js from reuqested route using express? var url = require("url"); app.get("/path/*", function(req, res) { console.log(req.path); // this will return // '/get/path/to/file' console.log(url.parse(req.path); // this will return // protocol: nul...

0
Q: Forever-npm will not start my ExpressJS app

dave_gerardI am trying to use forever so that I can assure that my ExpressJS app will remain running constantly. I am using Ubuntu 14.04 LTS. Strangely, 'forever list' displays nothing, 'forever --version' displays nothing I've tried: forever start -c "npm start" ./ and: forever start app.js With...

 
7:32 PM
0
Q: How to annotate core Node.js modules with JSDoc to have code hinting in IntelliJ?

Maurycy ZarzyckiSo far I have a need for two of them, util and fs. Given a code like this: var fs = require('fs'); var contents = fs.readFileSync('path/to/file', 'utf8'); Not only IntelliJ marks readFileSync as Unresolved function or method, but I am also devoid of, in my opinion, on of the best function give...

 
7:44 PM
0
Q: Angular.js app stress testing

DamianHow can I perform load/stress tests of my Angular.js application? It is deployed on Node.js invoking rest services from JBoss. I've tried to use Grinder but with no success. I appreciate any suggestions.

0
Q: Node.js hosting for websites, not apps?

Benjiko99Are the dyno based hostings useable for websites with little traffic that are mainly static? I guess they would cost more than i'll really use. Is there any node.js hosting specifically for websites?

 
8:08 PM
0
Q: mongoose inheritance of statics methods

jmcollin92I'm using Mongoose in a Node.js application and I want to use inheritance of model. I'm following the instructions given here Inheritance in mongoose and other links but I can't figure out how to make inheritance of statics methods. Here is what I try : // The BaseSchema class : function BaseSc...

0
Q: V8 lazy generation of stack traces seems to cause an infinite loop in the vows library

Philipp ClaßenI spent some time debugging a strange infinite loop problem in a NodeJS testsuite. It only happens under rare conditions but I can reproduce it when I attach to the chrome debugger. I think it has to do with V8's handling of stack traces in exceptions and a extension that the vows library did to...

 
8:29 PM
0
Q: With Bower, how do you include third party javascript in your build?

Albert LimI just downloaded a javascript library, and I included it by copy pasting into index.html. Whenever I do a Bower serve or build, however, it is overwritten. So far for my other javascript libraries it was easy by doing: bower install --save LIBRARY_NAME So for a library that cannot be insta...

 
9:04 PM
0
Q: save an array of collection using mongojs

ededI have an array of documents/objects looks like followings: var arr = []; var doc = {}; for (var i = 1; i <= 100; i++) { doc.id = i; arr.push(doc); } arr.forEach(function(doc) { db.docs.save(doc, function() { ... }); }); basically, I create a 1000 objects-array, loop ...

0
Q: Node.js, MongoDB, and Concurrency

user1502301I'm working on a game prototype and worried about the following case: Browser does AJAX to Node.JS, which has to do several MongoDB operations using async.series. What prevents multiple requests at the same time causing the database issues? New events (i.e. db operations) seem like they coul...

0
Q: What is the latest and greatest socket.io benchmark module currently?

Ismar SlomicI would like to script benchmark of my socket.io implementation. After some research I have identified several NodeJS modules, but they have either not been updated for past years (wsbench), or are only supporting websocket protocol (wsbench, thor) or is not testing socket.io implementation but...

0
Q: SASS; change font-family if size of element is above 16px

numediawebI don't even know if this is possible, I have to bring an RTL version of the website that is LTR.. I'm using Foundation 5 with Node and Grunt.Basically a file that overwrites some css rules of the original ltr file.. The client asked me to; Use a special font-family when the size of the element'...

0
Q: Why is my data being truncated with large files?

TimDogI'm writing a cli that PUTs data to a Meteor backend, which in turn uses express connect middleware. Any large file (over 700K) never finish uploading and the _req.on("end" event never fires. Smaller files (under 700K) work fine however, and the _req.on("end" event always fires. This is the cl...

 
9:29 PM
0
Q: ExpressJS loading static files with CDN source links

user2190690I'm learning Node / Express. I have set up a simple environment where I would like to load a static html file. The static html file has a link to the jquery CDN. When the static file is loaded and the script tag is executed Google Chrome reports: GET http://127.0.0.1:3000/http//code.jquery.co...

1
Q: JavaScript Testing a Simple Module

TheGrayFoxI'm new to JavaScript and I'm trying to understand why Jasmine-Node is telling me that stringCalc has no method add when it's clearly defined. Is add not being attached to the object, or is there something I'm missing as far as requiring the production file? Code: var stringCalc = (function() ...

 
10:24 PM
0
Q: Use node-formidable upload files, always get "Error Request Aborted"

user2471678 I use Express(3.6.0) + formidable(latest) for upload files to S3. When I submit post , then I always got Error Request Aborted. incoming_form.js: IncomingForm.prototype.parse = function(req, cb) { ....... ....... ....... req .on('aborted', function() { self.emit('aborted'); se...

0
Q: How to write those expressions in coffee script?

Alexandre FILLATREI'm trying to rewrite a javascript application to coffee script. Though, I can't find how to transform those 2 expressions (I added what I tried beneath). Can you help me please ? var config = require(path.join(__dirname, 'configs'))[env]; (What I tried) : config = require path.join __dirname, '...

0
Q: Using Rails / Node.js / Scala for a hybrid mobile app serving real-time updates

KelseydhI'm building a location-based app that needs to provide users with real-time information about the location of people nearby. I'm looking to avoid building native iOS + Android apps by using a service like Trigger.io to build a hybrid version with Javascript/HTML/CSS that can serve information v...

 
10:44 PM
0
Q: looking for the right way to authenticate mobile/web application against node back-end

user3052833I'm trying to build some CRUD application with node.js as a back-end API (express) and web-app (backbone) and mobile client (native android) as front-ends. As a node.js beginner (and web programmer in general) I'm trying to understand and find right and simple way to integrate the following grea...

0
Q: Meteor social share buttons not working

user1381537I can not get social share buttons working on Meteor... I add this inside my template <a href="https://twitter.com/share" class="twitter-share-button" data-via="decisionesdificiles" data-lang="es" data-hashtags="dificildecision">Twittear</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTa...

0
Q: MongoDB Node dirver: when does an app close it's connection without db.close()

WildcardMI'm writing a small application using the native MongoDB Node.js driver. My .findOne is receiving: { [MongoError: Connection Closed By Application] name: 'MongoError' } ...but db.close() is nowhere in my code. I assured this by searching every module for the word close. I commented out the ...

 
11:44 PM
0
Q: Sequelize not rendering junction (look up table) values

Mark RobsonI'm using Sequelize in a Node.js web app. I have a many-to-many relationship and am using a lookup table. The SQL that is generated looks fine, but when I come to use it only the values from the "group" table is displayed. This is how I've set up the models: //groups m.User.hasMany(m.Group, { a...

 

« first day (9 days earlier)      last day (68 days later) »