« first day (52 days earlier)      last day (25 days later) » 

12:21 AM
0
Q: Weird Node.js Buffer.toString() behaviour

Krzysztof WendeI've had some issues with making buffers into strings and other way round. When I did var b = new Buffer(4); b.writeInt32BE(1000); var c = new Buffer(b.toString()); It has returned a whole different value. so I've made a little test for(var i = 0; i < 255; i++){ var a = String.fromCharCo...

0
Q: How to properly reuse connection to Mongodb across NodeJs application and modules

spirytusI've been reading and reading and still am confused on what is the best way to share the same database (MongoDb) connection across whole NodeJs app. As I understand connection should be open when app starts and reused between modules. My current idea of the best way is that server.js (main file w...

 
12:57 AM
0
Q: How to write multi-line paths for routing?

user2127480Sometimes the routing path is too long so I want the path to display in multiple lines for readability. I know the normally a multiple line string is written like this: var str = 'hello \ world \ hi; However, this doesn't work in express.js routing. router.route('/:hell...

0
Q: How to disable event listener for socket when user disconnects?

BigMarioI'm using the Twit library for Node.js, and I begin by creating a stream of incoming tweets here: var stream = T.stream('statuses/filter', { locations: allLocations }) Then, using Socket.io, I send the tweets to each connected client, and also log when a user disconnects: io.on('connection', ...

0
Q: How can I avoid adding all routes to the app object in NodeJS with Express?

Paul MendozaIn my NodeJS application using Express it seems like I need to add all my "get" paths to the "app" express variable. It would be nice if I only had to register the module and not register each route. I'm coming from an ASP.NET MVC background where if I make a Controller class then it gets automat...

 
1:17 AM
0
Q: Node.js server.listen callback?

VulpusI have a node.js application and I need to run a command once the server starts listening. The docs on server.listen say: server.listen(port, [hostname], [backlog], [callback]) but when I try to use this format, the code is not run, but no error messages are appearing. Here is the listening part...

 
1:39 AM
0
Q: How can I prevent Express from parsing Angular templates?

Bryce JohnsonIf I'm creating a view in Express and I'm using Hogan for server-side templating, how can I include templates for Angular to consume as well? For example, the following is a simple Express view with Angular's 'hello world' included: <!doctype html> <html lang="en"> <head> <meta charset="U...

0
Q: Passport Login without Redirect Security (Node.js)

Dave LeeI am currently making a web application where when the user logs in, I don't want the page to be redirected -- instead, I want the client to simply update the current page its on (I thought about using AJAX requests). I am using a nodejs backend with passport as my authentication middlewear. CL...

 
 
1 hour later…
3:04 AM
0
Q: Node.js Express App - Rickshaw.Graph.RangeSlider TypeError: $(element).slider is not a function

Waley ChenThis is a similar question to Rickshaw.Graph.RangeSlider TypeError: $(element).slider is not a function I'm getting the error: "TypeError: $(element).slider is not a function". (Line 2) I specified jquery-ui ("^1.10.5") as a dependency in my package.json folder. Did an "npm install" and see the...

0
Q: Simple backbone app keeps through error

Warrick FitzGeraldI don't get it. When using JSFiddle, this simple example works fine: http://jsfiddle.net/5AMPz/ SearchView = Backbone.View.extend({ initialize: function(){ alert('hello'); } }); var search_view = new SearchView; However when I implement the same thing into a Node application I...

0
Q: Persistent connection across http requests

user3807016I have implemented a timer in my web application (which is online test of 1 hour) using javascript. Timer starts from 1 hour and eventually reaches 0. The webpage automatically closes when timer reaches 0. My problem is that i can't rely on javascript for timer because as it is on client side, so...

 
4:11 AM
0
Q: How to receive COM events in node-win32ole

KhachaturI have a small ATL COM object that implements one method (Method1) and fires one event (Event1) when this method was called. I can create this COM in my nodejs script and call its method. But I am unable to receive its events. This code works fine: var win32ole = require('win32ole'); var api ...

0
Q: If you're not using one of the built-in asynchronous libraries in node, would you use setTimeout to make a function asynchronous?

JohnGaltI have two functions one that I believe is validly synchronous and one that is asynchronous. synchronous Function Example function longProcess() { var reps = 5000000000; while (reps > 0) { reps = reps - 1; } } var simulateQuery = function(query, callback) { // simulate a l...

1
Q: Differences between nodejs modules and their exports

oorstI was just browsing through the nodejs source and noticed differences between the ways different modules are exported. For example, some modules export an object with a prototypical inheritance style: Thing = function () { constructor stuff } Thing.prototype.jump () { jump stuff } exports...

0
Q: cloud9 IDE: Trying to compile scss but terminal says"bash: npm: command not found"

BerI just started using cloud9 IDE online and I'm having trouble with a node.js project. No matter what folder I go to in the bash terminal, it says I don't have npm installed, but I can see in my "workspace" a node_modules folder, under which sass is installed. I want to be able to compile my .scss...

 
4:50 AM
0
Q: Inheriting attributes in Jade mixins

SahandIs it possible to have a Jade mixin call pass through the attributes passed to the current mixin? Example: mixin A() A=attributes.x mixin B() +A B=attributes.x +B()(x="test") It outputs: <A></A> <B>test</B> Because the attribute x doesn't get passed through to A. This is desir...

 
5:09 AM
0
Q: What's the difference between node-debug and node-inspector?

Dan DascalescuLooks like node-debug is a shell around node-inspector? When should each be used?

 
5:20 AM
0
Q: How do I set default options for traceur.compile and traceur.require?

Fabrício MattéUsing the official traceur module, is it possible to set the default options for compile and require? For example, this code works: var traceur = require('traceur'); console.log( traceur.compile('{ let x = 1; }', { experimental:true }).js ); Now if I remove traceur.compile's 2nd argument ...

 
5:49 AM
0
Q: socket.io - get connected client with specific property in a specific room

Manish SapkalI am using socket.io with node.js to give real time experience to my user. I have to find total connected client with particular property, How Do I do this? Let me show my code. io.sockets.on('connection', function(socket) { socket.join('room'); socket.browername = 'chrome' //here i set ...

 
6:07 AM
0
Q: Method 'exec' doesn't work in grunt task

Server HalilovI have a task that registred in grunt config: grunt.registerTask('test_Branches', 'Run Branches check on windows', require('PATH').check); And in my branches.test.js I have method check(): this.check = function () { 'use strict'; console.log("Execution started\n"); exec...

 
6:20 AM
0
Q: Best ways to merge folders using nodejs, grunt or gulp

ShprinkI have two folders and I just want to merge them (overwriting BaseFolder files with ExtendedFolder ones when present) Example: BaseFolder ---main.js ---test.js ExtendedFolder ---main.js Result expected: ResultFolder ---main.js (from ExtendedFolder) ---test.js (from BaseFolder) I similar que...

-1
Q: Publishing Website Using Node.js

user3815020I'm beginner in Node so I've searched how to publish my website which I use Node in it, After some search I've found this site sales force I don't know how to upload my website to it if it isn't the true host so how can I upload my website ?? Sorry for my bad English

0
Q: Correct Mongoose Syntax to Query messages that user1 archived?

StackThisIs this the correct query for finding all docs that user1 received where archived = true for user1? var query = { "to.username": user1, "to.section.archive": true }; Models.Message.find( query ).sort([['to.updated','descending']]).exec(function (err, messages) { A sample embed...

-1
Q: Are there any benchmarks comparing DartVM and Node.js?

Nikhil YeoleHow does standalone Dart VM perform with respect to node.js. Please share results, opinions.

 
6:49 AM
0
Q: Mongoose Model - Including GridFS Image Reference

Diode DanI'm trying to learn how to use GridFS (MongoDB), Mongoose, and Express. I am aiming to receive a POST with form data including SVG and JSON. I have the following model: var postSchema = mongoose.Schema({ title: String, img: { data: Buffer, contentType: String } }) var Post = mongoose.mod...

0
Q: Is it possible to list all 'rooms' even without any 'connections' to that particular room?

user3815107Currently I am in the midst of writing a nodejs chat app where there are multiple rooms. I am at a lost when trying to list 'all' rooms. For some reason the code: io.sockets.manager.rooms only lists rooms that have a connection whereas what I would like is a room to exist despite an empty occu...

 
7:01 AM
0
Q: install gulp browserify gives error always

Tzook Bar NoyIm trying to install gulp-browserify with this command: npm install gulp-browserify --save-dev I already installed many other packages successfully like gulp-autoprefixer gulp-concat gulp-minify-css gulp-sass gulp-uglify all of those installations worked great, here is how my package.json f...

 
7:22 AM
-1
Q: AngularJs or NodeJs or both

khaled el omarI want to develop Website using JavaScript/HTML5/CSS3 because it is more flexible in UI, I read internet about AngularJS for the client side and about NODEJS it can be used to both clent side and server side. kindly any one inform me (cons and pros) for the following: use AngularJs for client ...

 
7:39 AM
0
Q: nodejs filedownload using request and express fails

marcelI have a nodejs-server with a file-download-interface and a nodejs-client that requests this interface to get a file. The client only receives 18Byte of Data, after that the server returns code:404 after 4ms. Server: var express = require('express'); var app = express(); ... app.get('/File/:id...

 
8:35 AM
0
Q: Cron job not firing in callback function

GuomingI created a util.js with the following function in it. module.exports.getDateFilter = function (intervalInMinute) { var date = new Date(); var newdate = new Date(date); newdate.setMinutes(newdate.getMinutes() - intervalInMinute); // minus the date var nd = new Date(newdate); ...

1
Q: Load Balancing in Nodejs

RatatouilleI recently started with node and I have been reading a lot about it limitation of it been single threaded and how it does not utilise your cores and then I read this http://bit.ly/1n2YW68 (which talk about the new cluster module of nodejs for loadbalancing) Now I'm not sure I completely agree t...

 
9:09 AM
0
Q: Use mocha i a Nodejs-App without CLI

user3351722I want to use Mocha (JS Testing) in a node-application whitout CLI. If i do: var mocha = require('mocha'); var test = new mocha(); test.run(function(err){ if(err){ console.log("Found error"); } }); I get Mocha run. But how i can add a test? i need something like this: var testcase = ...

 
9:19 AM
0
Q: Session doesn't get saved between subsequent requests

Marco BolisI'm exploring Server-sent Events with Node.js and Express. I managed to set up request handling and writing of the stream, but now I'm struggling with session management, because I can't get the session to be persisted between subsequent calls. Server code: var express = require('express'); var...

0
Q: ExpressJS 4.0 exporting routes, getting TypeError

Trevor PanhorstAny suggestions to solve the following error based on the code presented below would be would be appreciated, as I'm simply lost here: ~/public_html/server/routes/api.js:10 api.use(function(req, res, next){ ^ TypeError: Cannot call method 'use' of undefined at Object.<anonymous> (~/publi...

0
Q: unable to parse throw new Error object in nodejs

user3699150Hi I'm trying to throw error and catch it in my nodejs file.The error being thrown is a object. But when i try to parse the error i'm gettingit as undefined. below is my code throw new Error("this is bad coding") The object that i receive is var error= {ERROR:this us bad coding} when i try...

0
Q: SocketRocket fails to send a message the first time

Bogdan RaducanI am working on an iOS application which communicates with a server through WebSockets. The server uses node.js with html5 websockets, NOT WITH socket.io (as i've seen in previous questions). I can successfully connect to the server, communicate with it, get realtime updates and such, but when I ...

 
9:55 AM
0
Q: Add description to routes in node.js with express

nkintI just found a nice tricky, via this blog post. Now, after express thing, I have this simple print: var routes = app._router.stack; var Table = require('cli-table'); var table = new Table({ head: ["Name"] }); for (var key in routes) { if (routes.hasOwnProperty(key)) { var val = route...

0
Q: Socket.IO method to receive data packet

user3041003From terminal, I'm getting this info. Is there a method where i can handle the data packet? debug - web socket received data packet Hello Is there a method to get the data packet? I've tried socket.on('message', function (data) { console.log('hi'); }); But the method isn't being called

0
Q: Google Cloud Storage API and Node.js

user3725410I am trying to work with node.js client library for accessing googleAPI (https://github.com/google/google-api-nodejs-client). I am trying to insert bucket and object using google cloud storage API. I can successfully list the buckets of my project's storage. Also can retrieve specific bucket from...

0
Q: Ajax posts on socket.io

monur000061)I wanna make an online quiz. I use socket.io just listen to nodes, that's all. Need to use ajax for the retrieving questions and answering them from database with php. So how can i use $.post method while my client address is localhost:3000 ?

 
10:22 AM
0
Q: best way to zip results from Q.all

sumekWhat is the best way to zip results from parallel (Q.all) promises call? Simply .spread(function(result1, result2) {return _.zip(result1, result2);}) Anything nicer?

 
10:55 AM
0
Q: Heroku Node JS Error

user3163711i was devlopped a node js , Angular JS and Mongo db application and when i deployed it to heroku just the get routes work if i login for example in the post route tel me that passed data is undefined TypeError: Cannot read property 'username' of undefined at Object.handle (/app/web.js:52:26) ...

0
Q: Getting elements from JSON in NodeJS

GenzottoI am working in NodeJS and I make the following request: request(url, function(error, response, body) { if (!error && response.statusCode == 200) { res.set('Content-Type', 'text/html'); callback(null, JSON.parse(body)); } }); The JSON I am getting is like: { "items...

0
Q: Collecting metrics with Node.js http.ClientRequest

AlanI'm looking to collect the same metrics you would get from cURL with Node.js http.ClientRequest and http.ClientResponse. Collecting the total time and time to first byte are straight forward, but the following seem a bit more difficult to collect: time_namelookup - The time, in seconds, it took...

 
11:06 AM
0
Q: Missile Game in Visual Studio express 2013

user3815992I am trying to create a game where you have a missile as your character and when you press spacebar, the missile shoots upwards in an attempt to hit the moving target. Thing is, when I try to code this it doesn't work and keeps on coming up with an error. Please can someone help me. I don't know ...

0
Q: How to retrieve data in the POST request from web site after the certain time.

isvforallSite's data can be obtained only after certain time after visited the site. I've made GET request and then after certain time the POST request, but it's not working. var request = require ('request'); var site = "http://example.com"; var time = 1000; request(link, function(error, response, bod...

0
Q: Do i need socket.io client

HowieI'm new to Node.js, bower and Socket.IO and I'm not sure what I need for my purpose. I'm making an app that has a frontend (where browsers connect) and a backend (a single Node.js server). What do I need to create a Socket.IO server instance on the backend? What do I need on the client-side? Do...

0
Q: cURL to http.request node

wazzadayI have connected to the basecamp API with cURL in PHP but cannot do the same with http.request in Node.js. Curl Setup curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => 'https://basecamp.com/345345/api/v1/projects.json', CURLOPT_USERAGENT => 'Testing the AP...

0
Q: Rails/NodeJS Model Relationship. One has many. Many are in many. Invoice creation WebApp

TidusekI'm looking for a way to create a simple relation between items(products) and invoices in my database. In the topic you can see rails/nodejs because the app is still in the planning phase and the framework is still not chosen. I think that the database relations can be implemented in both those ...

 
11:29 AM
0
Q: Socket.IO and express routes

hoverhandI would like to use socket.io and express routes and I have the following code: app.js var http = require('http'), path = require('path'), passport = require('passport'), userpassport = require('./lib/strategies/local'), githubpassport = require('./lib/strategies/github'), flash = r...

0
Q: Prevent spamming async API calls from client side?

Martijn19I'm creating a small multiplayer game were players are allowed to buy cards. Inside the buy card method I'm doing a series of async requests that check if the user has enough balance, if the game has not started yet etc. However, when I do this in my console: for(var i = 0; i < 100; i++) { ...

0
Q: Node template engine, like EJS, that doesn't break the HTML template?

shennanWondering if there is a templating engine like EJS for NodeJS that doesn't break the original template HTML through its use of parenthesis. In EJS, for example, one might use the following to insert specific data into the HTML template: <script> window.$data = <%- JSON.stringify(data, null,...

0
Q: npm install throws error when run through powershell

user3212848I'm using Octopus Deploy to deploy a small node.js application. As a result im calling npm install --msvs_version=2012 To install all my packages. However when run through power-shell I get the following errors in my log. Yet all the packages still install fine and the deployment runs as expe...

 
11:52 AM
0
Q: Node.js request charset issues

andrepcgI'm building a nodejs web crawler but I'm running into some charset issues. Different websites have different charsets, like UTF-8, windows-1252, iso-8859-1 etc. How can I adapt my request to convert all charsets different than UTF-8 to UTF-8? Because if I don't do anything and simply use cheeri...

0
Q: InvalidAsn1Error: Expected 0x2: got 0x49 in node-rsa

PrabuI am using node-rsa module for decrypt the key . I have created one private key from p12 file by using below command openssl pkcs12 -in xxx.p12 -nocerts -out privateKeyPkcs12.pem it has given rsa private key so i have tried to create key by using this rsa private key like this var NodeRSA...

0
Q: Node.js URL POST rewrite

TomiLI have this function in js file: exports.authentication = function(req, res) { // .. // user validation // .. res.redirect('/login'); }; How can I rewrite all POST request to different path, like /admin/XY, i.e. /admin/login instead of /login in my example? I now I can hard-enc...

 
12:14 PM
0
Q: Passport js + Express js: allow access to public pages

AneeshI am working on a web application where I need to allow user to browse around various public pages like login, signup, blog etc. However, to view his account details he needs to login. I am using passport js for authentication. This is an express js application. I am using a middleware interrup...

 
12:41 PM
0
Q: Upload file Cordova node js

Houssem2101I'm trying to upload a file from a cordova app to a node server but i have this exception in the server side Cannot read property 'file'of undefined i'm newbie in javascript and i need help thanks this is the client code <script type="text/javascript" charset="utf-8"> // Wait for de...

-9
Q: Freelance Developer Job - Social Network Backend

user3816264Freelance developer with 5+ years of relevant experience needed. We are looking for a skilled freelance developer to create a full server backend system for a private social network application and site. Key features: Messenger (Individual & Group text, image/video, voice clip chat). Persona...

0
Q: RangeError: Maximum call stack size exceeded with mongoose

Vinz243I am trying to aggregate using time buckets. Then, I want to return an array full of the values per day (0 when no document found). The aggeagate function work wondefully, but when I replace the callback (formerly console.log) like this: Star.aggregate([{ $match: { "mod": new mongoose....

 
12:59 PM
0
Q: node.js createServer socket timeout - how to close/destroy socket

RoyHBIn the simplified code below, i want to close or destroy a socket if it times out. The code works, allows connections, receives data, all is good except I need to close/destroy the socket on timeout so as to force the client to reconnect. From within the timeout event, if I look at the socket (...

0
Q: checking if busboy finish event has already occured or not

deadmanI have a form in which I am expected to do some file processing which takes some time, so I want that finish event executes only after the processing is complete, right now node is processing the file and while it is processing the file and executes commands node if finds finish event it fires i...

 
1:22 PM
0
Q: node.js child_process.spawn no stdout unless 'inherit'

dbennyI'm trying to capture the stdout from a spawned child_process in node.js (0.10.29). Right now I'm just trying with ping The following code doesn't print (but does ping) var exec = require('child_process').exec; var spawn = require('child_process').spawn; var util = require('util') var ping = ...

-1
Q: Brunch.io - require conflict

KursionI guys, I'm using coffeescript and brunch.io to compile my project and have a single app.js file which is great !!!! Currently, I have the main project which use tools = require 'utils/tools' and I'm developping a small framework/lib which does the same (it's a different project which I've trie...

0
Q: When building bootstrap, how can I select a different build path other than 'dist'?

FANG YishuWhile building bootstrap from source code, the default build path is dist, can I specify another path without changing the Gruntfile.js too much?

0
Q: AT&T Developer Language - Connected Car

Chris CDoes anybody know what language AT&T is using to write apps for their "Connected Car"? I see apps like Pandora on the dashboard of the new Corvette, but I don't know how they are getting them there. Is there an SDK? AT&T Car API? Thanks in advance.

 
1:35 PM
0
Q: Finding all pages on domain with NodeJS

Jevgeni JostinI'm trying to find all the pages on a domain with Node. I was searching on Stackoverflow, but all i found is this thread for Ruby: Find all the web pages in a domain and its subdomains - I have the same question, but for Node. I've also googled the question, but all I find are scrapers that do no...

0
Q: Retrieve all bit values in byte NodeJS Buffer

Lee ArmstrongI have a simple Buffer object and want to read the bit values from it. var buffer = new Buffer([16]); In theory it should be 10000110 as the result?

-1
Q: Can we build n-trier achitecture in node.js application

skmahawarI am beginner to build a node.js application. while going through research i got a question that can i build n-trier achitecture in node.js application?. but i did'nt find answer of this question a better one.

 
1:59 PM
0
Q: example of d-quill in a DerbyJS project

RoostertailHas anyone used d-quill in a derby Nodejs project? Along with my limited knowledge of nodejs and derby I need to get something working for a project. I am using examples from derby-examples and trying to use the component.

0
Q: Mongo find() query with embedded JSON object not returning data

jrbaldwinnI'm using Mongoose to query Mongo in Node.js, using this command: var qw = { 'permissions': {'ownerID':req.user._id} }; landmarkSchema.find(qw, function(err, lm) { console.log(lm); }); Where req.user._id = "53baf81408802a00002166b8" But nothing is returning....

0
Q: Typescript plugin for Eclipse not working

scrblnrd3I'm trying to use the Typescript Eclipse plugin by Palantir, and whenever I try to open a Typescript file, I keep getting this error java.io.IOException: Cannot run program "/usr/bin/node": error=13, Permission denied I installed node globally with npm. How can I solve this?

0
Q: Why am I getting a TokenError when authenticating with OAuth2Strategy for Passport/Node Express

ChrisI'm trying to use the OAuth2Strategy for Passport JS in conjunction with Express (4). After I'm redirected to to login, it successfully navigates me back to my callback url, at which point I get the following error: TokenError: Invalid client or client credentials at OAuth2Strategy.parseErrorR...

0
Q: Express bodyParse cannot parse data coming from Internet Explorer

Riccardo BartoliI've created a server app using Node and Express 4, while the front-end is built using jQuery. I've got an Ajax call sending some data using POST to the server: $.ajax({ cache: false, type: 'POST', url: Config.API_ENDPOINT_REGISTRATION, dataType : 'json', data: info, ...

0
Q: Read Encrypted Password in Java

yonatanI have the following code in javascript / nodejs that encrypt passwords. I need to read these passwords in java: encryptPassword: function(password, salt) { var salt = new Buffer(salt, 'base64'); return crypto.pbkdf2Sync(password, salt, 10000, 64).toString('base64'); } I Used this meth...

 
2:29 PM
0
Q: When to generate ssl key and cert - for security reasons

Luke WillisI'm looking to generate a privatekey.pem and certificate.pem for authentication in a nodejs server. I know these can be generated via OpenSSL and then saved to a directory, but I also found pem to generate the key and cert on demand. The answers to this question suggest that either is fine, thou...

0
Q: CORS headers in SOCKET.io

RatatouilleI aware their quite a long list of ppl who have faced the similar issue but all the approach I tried haven't worked yet I have socket.io server running at port 80 for assumption the domain is http://nodeserver.io I also have client.js(socket.io client) render by a rails app for assumptions th...

-1
Q: Softwares and language to usse in an app which have some data interaction in local environment and full data interaction with the web

Sagiruddin MondalThe requirement is very specific and kind of modern. I want to create an app which will work as a standalone on any OS (mainly Windows but in MAC & Linux too) but it will have an interaction with internet too. So it will communicate through internet for huge database access but there should be da...

 
2:46 PM
0
Q: Control download interruption with Node.js

Ghost BunniesI am trying to build a downloader in Node.js and here is the code I have written so far: // Modules var child_process = require('child_process'); var fs = require('fs'); var http = require('http'); var url = require('url'); // Sources var src = 'http://www.download.com/app.exe'; // HTTP GET re...

 
2:58 PM
0
Q: Meteor._wrapAsync causes 100% CPU

NyxynyxAn app is using meteor-redis package to run a redis query which can sometimes take 30 seconds to return 100k results. During this waiting time, Meteor freezes and takes up 100% CPU while waiting for the query results. var client = redis.createClient(port, url) client.zrangebyscoreSync = Meteor._...

 
3:09 PM
0
Q: Sending two objects as response to a single GET request using Express and Node.js

rkmrI have the following piece of code - sendServer.get('/download',function(request,response){ var status="SELECT * from poetserver.download where status='0'"; console.log(status) connection.query(status,function(error,rows){ var toSend=rows[0].id response.sendfile('./testimages/'+toSend+'...

0
Q: Using Node.js to access azure tablestorage

SlicedbreadI've been trying to write a typescript application in visual studio using node.js to store and access data in an azure table store. I've been having some trouble with the tutorials I've found. I've yet to get one to work properly. I have Node installed on my machine and a tablestore set up in ...

0
Q: express (4.0) custom middleware runs on both instances of router even though it's only declared for one

CostaI'm using the code below to learn a bit about the new express.js (4.0). I can't seem to understand why the logging is happening regardless of which path I hit with my browser. Shouldn't it only log for website.get and not for api.get paths? // Express 4.0 test... var express = require('express'...

 
3:42 PM
0
Q: NPM: make package.json work under both Unix (Mac OSX) and Windows

ZarinI've gotten some NPM package from a third party who is developing under Mac OSX. Their build can split into either development or production using "scripts" object in package.json. For example: "scripts": { "build": "NODE_ENV=dev node make.js --build", "build-prod": "NODE_ENV=prod node ...

0
Q: Resample Time Series Data using Javascript and Mongodb

NyxynyxA data set of time series data needs to be turned from one with irregular time intervals to a regular time series, probably using interpolation and and resampling. Python's pandas.Dataframe.resample is a function that will do this. Can Javascript do the same? The time series data set is stored i...

 
4:15 PM
0
Q: 404 Not Found when form is submitted but works when the same URL is reloaded

user3651267I made a simple login system using ExpressJs and on submission of form the user is directed to www.mywebsite.com/submit and see "Not Found 404" but when i refresh the same page i see the view for that. I am not sure why it is happening but here is the code Index.js(Route) var express = require...

 
4:31 PM
0
Q: Node.js get Exec parameters/command in Callback

Adam MerrifieldI have multiple images I want to manipulate(imagemagick's convert command) in my filesystem. The number of images will be dynamic, but for this example lets use 8. None of these images are dependent on each other so I don't want to call 8 synchronous execs (execSync). Current code: var outfile...

0
Q: Bootstrap install troubleshooting

user3680304So I am trying to get started with Bootstrap, so I downloaded the client for Mac, as well as installed node.js and ran the command below successfully. sudo npm install -g bower However, now when I want to run any bower install it is saying command not found. Does anyone know how to troubles...

 
4:56 PM
0
Q: Portscanner JavaScript

user3817315I am new to Javacript. I want to use a range of IP addresses on port 80 and get a result that which ip addresses are open on this port. I want to receive such result: 192.168.0.1 has the port 80 open 192.168.0.10 has the port 80 open 192.168.0.15 has the port 80 open 192.168.0.20 has the port...

 
5:29 PM
0
Q: Node.js RangeError: Invalid string length

user3390265ref0.child('sheet_objects').once('value', function(snapshot) { for(var i in snapshot.val()) { sheet_objects_so[i] = -1 if(!(i in workset_so)) orphaned_so[i] = -1 } getSheetObjectsStudent() }) ref0 is for accessing the Firebase. When I run this code, I got...

0
Q: I know how crc works, but how to use it?

laike9mI've read the famous article A PAINLESS GUIDE TO CRC ERROR DETECTION ALGORITHMS, now I want to try this out. I'm using a nodejs module node-crc, it looks easy to use: var crc = require('crc'); crc.crc32('hello'); # => "3610a686" The result of function crc32, I believe, is the checksum of hell...

1
Q: Install node-serialport module on arm-linux

curious_guyI have been using node-serialport on my linux X86 machine and it works great. Now I am trying to install node-serialport on an embedded platform running arm linux. I managed to cross compile the node itself and able to run node/npm on the target platform. However, simply running "npm install s...

0
Q: javascript - Scraping data from other sites and use it as a web service

user3817427I am trying to make a web service that scrapes data from a site but the one I made is not displaying on my browser. I am using Nodejs with Express framework. My scores.js works, I can get JSON data from it if I run it on the command prompt but when I run it under the Express framework, nothing s...

0
Q: Is it possible to add UI to a node.js application? or is there any UI library for node.js

Dhunju_likes to LearnI am using 'bleno' (https://github.com/sandeepmistry/bleno, node.js module for implementing Bluetooth low energy peripherals) on my raspberry pi. It works great on terminal but I am looking to make an GUI. I have searched for hours but couldn't find it. there are couple of related threads on SO b...

0
Q: Failing to install the Grunt command line interface

Jonathan BeechI am currently having trouble installing the grunt command line interface, i get a whole lot of errors on the log when I try and install it using instructions off a tutorial website. I just added node.js from a package I downloaded off their website. Any help would be appreciated? npm ERR! Error...

0
Q: Data conversion using Node JS

Usi UsiI'm using the module dataformat to get a data from a timestamp but I get an error and I can't understand why. that's the timestamp 1405303200 and I need the Date in this format dd/mm/yyyy That's my code var day=dateFormat(result.request_date, "dd/mm/yyyy"); But what I get is the 1970-01-...

0
Q: How do you use the Angular package in NodeJS and Express?

user3228667I installed the Angular package via npm install for my Express project, but I have no idea how to use it. How is it used if installed in this manner? Or is the only way to use Angular is to include it using "script" in the html page?

2
Q: node-webkit How to send parameters to a new window?

shujiI have created a new window with this piece of code and tried to send some data but the function is not called, maybe I'm doing it wrong? element.onclick = function(){ var win = window.open('listdir.html'); alert(this.getAttribute('data-location')); win.eval(null, listdir(this.getAtt...

 
6:27 PM
0
Q: Server proxy with Node JS

patricKI want to build a proxy with node.js to use in my browser. I searched at google and saw that example, but some Apis are deprecated. So I changed the code following: var http = require('http'); http.createServer(function(request, response) { console.log("req for:"+ request.headers['host'] +...

0
Q: How to validate client send facebook data on server

user3816094I'm using facebook login with javascript sdk for my web application. My application steps were User login to Facebook After user was logged in to Facebook, fetch user data. Send fetched user data back to my application to find or create user account The problem is I don't know how to check th...

 
6:50 PM
0
Q: nodejs express subdomain routing

TekkzzI wanted to set up a subdomain on my domain and my odejs server. First question: Is the subdomain to call a different server on an other port? Or to open special pages which have a special "group"? Second Question: Why don't i get the dev.txt file viwed but the standard-no-subdomain page? I call...

0
Q: How to ask PHP server for data with Node.js?

dufiaI've been trying to achieve this for a day and a half, at the moment I feel like probably I do something fundamentally wrong and I need help/advice. What is the problem I'am trying to solve? I want to build an app that is connected to the external Wordpress database and the app has to be able to...

0
Q: Sending http POST request to local nodejs Server

JerryFoxI am trying to find a way to send an Http POST with an array of latency data from a client's html page to the node server on localhost. So far examples I have found instead show only how to set up the GET/POST request on the server side but not sending from client to server. I have no experie...

0
Q: Meteor.js - how to rerender a template on login

DevilwarriorsI have an app with a leaflet map on every page in a template named "map". In that map I'm adding a contextmenu in the "Template.map.rendered" function. Where it get tricky, is that I want to add a disconnect link and a profile link in that contextmenu when the user is logged in, but not when the...

0
Q: yeoman angular generator wont start on grunt serve

Steve BirknerWhen I set up the angular generator with yeoman I get this error after doing grunt serve module.js:340 throw err; ^ Error: Cannot find module './lexer' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require...

0
Q: Add hash to set member -- node-redis

RamselRedis has me very confused. I simply need a set of users. The keys for the users will be their userIDs: var user = userID; I then want hash values set for these users, and right now I only have one - socketID: // add first user redis.sadd("users", user); redis.hmset(user, "socketID", ...

 
7:14 PM
0
Q: Node.js Hosting w/Multiple Ports, or wrong practice?

clayperezI'm trying to figure out the best workflow for producing an app I can have hosted on one of the various public Node environments. The sticking point seems to be that my app opens two ports: one for HTTP and another for WebSockets. Here's the code which executes great on my own system, but runs i...

 
7:31 PM
0
Q: Python to JavaScript Using Node.js

StudentLostI want write a JavaScript function that I have already the algorithm with Python `def __init__(self, region = 'eu'): self.secret = '' self.serial = '' self.region = region.upper() self.offset = 0 `def get_password(self): validity = (30 - int(time.time() + self.offset / 1...

 
7:55 PM
0
Q: Error when installing Grunt

Jonathan BeechHello I recently tried installing grunt-command line interface according to the instructions on their website using the node package manager command sudo npm install -g grunt-cli It didnt work and I got the following errors /usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/gru...

0
Q: Why do some node properties give me undefined when I log them?

ExitosI have an endpoint in my node app and I am doing the following... app.put('/api/authentication', function(req,res){ console.log(global.ff); //undefined console.log(req.ff); //undefined console.log(blah); //throws error }); I don't understand why they first two give ...

0
Q: How to clone a mongoose document?

user3817957This is a followup to Easiest way to copy/clone a mongoose document instance?, which isn't working for me. The following code throws a "cannot edit Mongo _id" field, rather than wiping the ._id and creating a new document in the collection. Is there a better way to clone all values of a docume...

 
8:19 PM
1
Q: Express 4 Route Issues

user127Just learning nodejs, express, jade. While making progress, I am having trouble understanding how the routes work. I have the routes in a routes folder and the views (Jade files) in a views folder. And that works, but I don't see how. Let's say I have a page foo. In routes, I have foo.js: ...

0
Q: AngularJS re-sending $http request after 120 seconds

jrbaldwinnFor every $http request (GET & POST) I'm sending through Angular to the Node.js backend, Angular will re-send the same request after about 120 seconds (varies from 120000ms - 120002ms). i.e output from server. server response POST /api/user/login 200 120001ms server response POST /api/user/l...

 
8:56 PM
-2
Q: What is the best way (using any technology or sites that provide a service) to combine the functionality of many websites on one website?

user2242193I'd like to create a website that utilizes the services of other websites but does so without exposing the component websites' identity to the end user. For example, I'd like to create a site that uses the services of 3 different unaffiliated websites. Each of these different sites is in a diff...

 
9:11 PM
0
Q: zombie.js call stack size exceeded when parsing html with jQuery

BradI've been getting the error: "RangeError: Maximum call stack size exceeded" when working with zombie.js and jQuery. I've distilled the code as much as possible to recreate the error. Here is a file zombie.js that can be run with nodejs using the command "node zombie.js": var Browser = require("...

 
9:23 PM
0
Q: How do I gracefully handle closing a websocket when one endpoint is still readying data to send?

sedgeI have a NodeJS server that does asynchronous processing after receiving data from the client through a websocket. When it's finished processing, it sends data back to the client. I've run into a case where the connection is closed abnormally while the server is still processing data. There's no...

0
Q: Variable scope with Nodejs + Coffeescript

user3818168I'm having an awful time tracking this one down. ... for offset in [1..range] queryDate = moment().subtract(offset, 'days') console.log "offset -> " + offset # gives 1, 2, 3 # check if a row already exists for this day Datum.findOne { date: { $lte: queryDate.toDate() } }, (err, datu...

 
9:46 PM
0
Q: Open URI - Opening multiple pages

TheGrayFoxUsing Node's open-uri module, is it possible to open multiple pages such as this? For example, a user's blog might have 10 pages. index = 1 page = open("http://#{user_name}.tumblr.com/page/#{index.to_s}") do |page| # grab some data... end

 
10:04 PM
0
Q: Is there an equivalent to Pythons iterator tools for Node.js?

MrMowgliI'm trying to port some code that uses Python's iterator tools to Node, however I'm not seeing any analogs out there. I'm specifically looking for a replacement for itertools.combination() I've seen this one, but it's incomplete and out of date: node-intertools

 
10:42 PM
0
Q: OpenShift - Connecting to a scaled gear's MySQL cartridge from another gear

GavinI have a Node.js gear (not scaled) and a PHP gear (scaled) with a MySQL cartridge. I want to connect to the MySQL cartridge from the Node.js app. The documentation for this is not concise and seems outdated, but from what I've gathered I need to forward my MySQL port to the Node.js app. I creat...

 
10:54 PM
0
Q: expressjs 4.x and https, generate key and certificate

nkintI want to create an https server with express 4.x. Even if a lot of code found on google is based on express 3.x I think I made the port correctly. Even if I tried to goole it is not very clear to me how to generate the keys. Without the key I'm expecting 401. I tried with the script found in t...

0
Q: Reading badly encoded JSON file in PHP or node.js

Aaron J SpetnerI am trying to parse http://www.oref.org.il/WarningMessages/alerts.json - Chrome seems to do a fine job of it and if I download it using wget I can view it fine in VIM. However when trying to parse it with either node.js or PHP the parsing fails. I have tried all sorts of things, including mb_con...

 
11:15 PM
0
Q: Mongoose query based on subcollection members?

Cory KleinThis Mongoose.js documentation explains how you can populate queries with the collections they link to: Story .findOne({ title: 'Once upon a timex.' }) .populate('_creator') .exec(function (err, story) { if (err) return handleError(err); console.log('The creator is %s', story._creator.name);...

 
11:26 PM
0
Q: Post a tweet using needle for node.js

f_ficarolaI'd like to automatically post a tweet when a user visits my webapp. I'm using express.js as server, passoport.js for authentication and needle to send POST requests. I've even followed the full procedure for posting, building authorized requests and creating a signature. I'm using heroku as appl...

0
Q: NodeJS Socket.io disconnect issue

Camille GreselleHey I have an issue that I have been working on for may hours... I know the code isn't secure that much but this is the issue: I connect an user through socket using its login details which are stocked in sessionStorage When I trigger the disconnect socket, it switchs with the others connected...

0
Q: How do I save complete webpage with related resources in node.js

user3818374How do I save complete webpage with related resources in node.js. I have used scrappers, but they only take screenshots, and some functions are only saving html. I want to save complete webpage with its related resources in node.js.

 
11:57 PM
0
Q: HTTPS NodeJS and Heroku. Forcing HTTPS?

Dominic Bou-SamraI have a NodeJS HTTP (non S) server running on Heroku. I have SSL configured, and it accepts requests to HTTPS. The reason I am using a vanilla HTTP server is because of the following: SSL termination occurs at Heroku's load balancers; they send your app plain (non-SSL) traffic, so your app shou...

 

« first day (52 days earlier)      last day (25 days later) »