2
votes
1answer
19 views

Javascript, node, Q promises, prototype functions, and “this”

I don't really understand why "this" is undefined in my handleAuthSuccess function, but I imagine it has something to do with it being called by the promise. Can anyone explain? What is the a proper ...
0
votes
0answers
14 views

node.js : Express, socket.io and PostgreSQL

I am using Express, node.js and socket.io. What I would like to implement is a system in which everytime a user connects to the page (upon 'connection' event), an SQL request is performed so the ...
0
votes
0answers
24 views

Async not working in node js

I am currently trying to develop a small social website. The following function looks in the database and should pass the needed data into my ejs file (html). Although the database is accessed ...
0
votes
1answer
13 views

Express.js proxy post request

I reviewed request module for node https://github.com/mikeal/request But can't figure out how to proxy POST request to remote server, example app.post('/items', function(req, res){ var options = { ...
0
votes
0answers
17 views

Node.JS File Upload Keeping Extensions when it shouldnt

By default Node.JS should drop the extension on file uploads. This worked when I tested my project initially and I used body parser to set keepExtensions to true. This worked as expected and I began ...
1
vote
3answers
23 views

node.js & express: for loop and `app.get()` to serve articles

I'm working on a node js express application that uses app.get() to serve the different web addresses. So app.get('/',{}); serves the home page, app.get('/login'{ }); serves the login page, etc. Is ...
0
votes
1answer
15 views

'simple' scoping issue in socket.IO server

I have a simple node .js socket.IO server whcihs is working but scoping in my event callbacks is incorrect. How do I properly reference 'client' from within my client.on handler?? ...
0
votes
2answers
20 views

Process.domain undefined in Node 0.10

I'm getting around to using domains and am trying a couple of Express domain middleware packages: https://github.com/brianc/node-domain-middleware https://github.com/baryshev/connect-domain ...
0
votes
0answers
19 views

Node.js request CERT_HAS_EXPIRED

I'm using Mikeal's request (https://github.com/mikeal/request) to make an https request to a server. However, I keep getting an authorization error of CERT_HAS_EXPIRED. request({ url: ...
0
votes
0answers
14 views

Getting D9025 warnings and C1083 errors from node.js modules… I'm out of ideas

First I must be clear, I am by no means a javascript guru.. I'm simply very enthusiastic about it and I enjoy learning new things. I'm running Windows 7 Ultimate x64 with SP1, Windows updates are on, ...
0
votes
1answer
27 views

Define variables out of a file

I just discovered Sails.js, a MVC framework for Node.js. A controller is a file who export an object associating a method name to a function, il looks like this : module.exports = { method : ...
0
votes
0answers
10 views

Grunt.js/Grunt-contrib-watch packaged with Yeoman does not work

I recently installed Yeoman and am finding that the included livereload feature (provided by grunt-watch-contrib) does not work. In fact, nothing short of restarting the Node server altogether ...
0
votes
0answers
10 views

Mongoose Followers/Friends Relationship Query

I am trying to make a query that returns posts from both Friends and Non-Friends, but ensures Friends Posts are at top of list. What I have now only gets posts from Friends: Schemas var Post = ...
0
votes
1answer
18 views

How to post on Facebook with Node.js?

I just started messing around with Node.js and it's modules export and passport. After setting up login for Facebook, I'm stuck for hours how to post on my wall within the app. I've registered app on ...
0
votes
0answers
12 views

Writing a grunt task that only part-runs in response to a watch

I've written a grunt task grunt-demoer that builds a demo html page for a front end widget out of its mustache templates, sass and js. I also want to allow watching of all these files and to rebuild ...
-3
votes
1answer
35 views

Security with Node.js [on hold]

I'm looking for a master thesis topic on "Security with Node.js". i've some ideas about analysis and testing the security measurements on node.js, and after this i will create a module to enhance the ...
-1
votes
0answers
39 views

How to minify and concatenate node.js app with all dependencies into single js file?

I have node js app with some dependencies inside node modules folder. What I need is to tranform it to single js file which can be required as a module. How I can accomplish this task?
0
votes
2answers
30 views

Configuring 'simplest' node.js + socket.IO + Express server

Realized after setting up a simple node.js socket.IO server that it isn't sufficient to handle even the simplest webpages containing script tags. So I investigating express which is a simple web ...
0
votes
1answer
21 views

Best way to serve static files using versionning with nginx / node

I actually have: Nginx running to serve static files (css, js, etc.) Node with express.js, template engine: ECT (I may change for Swig) I am currently trying to find the best way to distribute ...
0
votes
0answers
10 views

How to define your custom mode and load from cdn AceJS at the same time?

I can load AceJS from CDN and use it like this: <script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script> ...
2
votes
2answers
43 views

extract words in string with unicode characters

In javascript (nodejs) I need to index text strings with unicode characters, i.e given a string like: "Bonjour à tous le monde, je voulais être le premier à vous dire: -'comment ça va' ...
0
votes
2answers
32 views

How to get data from response to get request in node.js?

Trying to make get request from node.js with express module. Here is code of this piece: var req = http.request(options, function(res) { res.on('data', function (chunk){ }); }); req.end(); ...
0
votes
1answer
21 views

HTTP Post request json data changes

For some weird reason, when I have my client send an HTTP Post request to my server, the data changes. Everytime I console.log the data in server, my data no longer has commas. Instead, it replaces ...
1
vote
1answer
24 views

Mongodb find query array starts with element

I have collection where document like { "_id" : 1, "path" : [ 3, 1 ], "name" : "A" } { "_id" : 2, "path" : [ 3, 1, 1 ], "name" : "B" } { "_id" : 3, "path" : [ 3, 1, 1, 1 ], "name" : "C" } { "_id" : ...
0
votes
0answers
28 views

NodeJS Email Alias Server

The scenario is simple: I own several domains I want to run email on those domains I wantthem all to deliver to the same address regardless of who they where sent to or on which domain I want ...
0
votes
1answer
54 views

How do I JSON.stringify( anObject ) without colons, backslashes, curly braces or quotes?

This is a simple sentence. I don't want anything <form><b>but</b></form> this. But after some client-side html manipulation and... var newBody = JSON.stringify(req.body); ...
0
votes
2answers
23 views

Appending EJS partial with jQuery

I'm trying to use JQuery to append an EJS partial. What I want to do is to implement infinite scrolling in a table - I am using EJS to render the table's rows as partials and within each partial using ...
1
vote
1answer
23 views

Acknowledgment for socket.io custom event

I am looking for a method to acknowledge a socket.emit call. socket.emit('message', msg); I have seen a mechanism were the receiver will send another custom event as an acknowledge, but this would ...
0
votes
1answer
25 views

Can't pass a nested object to res.render()?

I want to access a variable on client-side javascript, through jade, passed on form the server (node). So I make a nested object: var clientData = {clientData:{ title: 'Title', body: ...
0
votes
2answers
22 views

npm install can't find new version

I'm simply trying to do sudo npm install on a mac,with following dependencies: "devDependencies": { "grunt": "~0.4.2", "grunt-contrib-jshint": "~0.6.3", "grunt-contrib-nodeunit": "~0.6.3", ...
3
votes
0answers
37 views

How setup a proxy server using node js ?

i setup a proxy using node js my script is like this var http = require('http'), httpProxy = require('http-proxy'); var options = { pathnameOnly: true, router: { '/wamp_application/': ...
0
votes
0answers
11 views

File upload with DalekJS?

I'm trying to automate cross-browser tests with DalekJS, and there is a portion of the site where there is media upload. In my script, I created a query object to upload a single image. Would it be ...
0
votes
1answer
35 views

How to open image in javascript,sent by express.js sendfile function[+SOLUTION]

I have a simple server which has this method app.post('/', function (req, res) { res.sendfile(path.resolve(req.files.image.path)); }); How do I get data, on client side in Image object? this is ...
0
votes
2answers
27 views

Ending REPL server without having instance

If you don't run a script via command line, node enters the REPL mode automatically. I want to exit the REPL mode. The REPLServer class has a close method but I can't call it because I don't have ...
0
votes
2answers
50 views

How to print to html with express node.js

How does one display text held in a variable on the server side node.js in html. In other words, just to be doubly clear, I have output pulled from an api that accesses twitter (Twitt) and I am ...
0
votes
0answers
21 views

Rsync fails with exit code 23 only when run from Node

I am using the rsync module with Node v0.10.22. Rsync exits with code 23 (Partial transfer due to error) when run from Node, but succeeds when run from the same exact shell as the crashed Node ...
2
votes
4answers
39 views

NodeJS Callback Scoping Issue

I am quite new (just started this week) to Node.js and there is a fundamental piece that I am having trouble understanding. I have a helper function which makes a MySQL database call to get a bit of ...
5
votes
3answers
60 views

Where does “request” and “response” come from, and how could I have found out?

I've decided to learn node, an so I'm following, to begin with, The Node Beginner Book. As in I guess a lot of other resources, there is the "simple HTTP server", first step, something like: var http ...
0
votes
1answer
11 views

mongoose query to return products that are linked to a user

I am new to node, express and mongoose. I am working on my first study app to get the knowledge required to build a real node.js application. In my application I have a Products model (mongoose) ...
1
vote
1answer
50 views

Doubts about NodeJS Module Development

I'm trying to code my very first NodeJS module, but I'm having trouble grasping some concepts. Here's the code that I currently have (a genexer counter/generator): "use strict"; var ret = ...
0
votes
1answer
23 views

node.js nodeschool learnyounode need help understanding the code of the solution

Question - the exercise from NODESCHOOL.IO;LEARNYOUNODE;MAKE_IT_MODULAR reads directory and filters files by a given file extension - uses a module to do most of the work. Question on the added code ...
0
votes
1answer
26 views

How does Node.js resolve link tag to node modules

I am learning to use socket io in node js and I came across this example that really bugs me. I am following the example at http://socket.io/: client side: <script ...
0
votes
1answer
29 views

Error: Can't set headers after they are sent

hey guys i'm trying to do a login function but the Error: Can't set headers after they are sent is keep showing up in my terminal, based on my understanding this error is causing by res but i can't ...
4
votes
2answers
93 views

Convert two 32 bit integers to one signed 64 bit integer string

I have a 64 bit unsigned integer I need to represent in PostgreSQL. I've broken it down into two 32 bit unsigned integers, high and low. To allow Postgres to accept it, I need to convert high and low ...
0
votes
1answer
52 views

node.js Async URL Retrieval to JSON

The below code goes out and grabs a JavaScript variable from a URL for each of the keys in codes and then once all the variables are retrieved successfully it creates a JSON object from the cumulative ...
0
votes
1answer
30 views

Is there a Javascript equivalent of Ruby's FastCSV [on hold]

I need to import some structured text files to the server using Javascript. I typically work in ruby/rails and was wondering if javascript has a FasterCSV equivalent that would make my import task ...
0
votes
1answer
21 views

Selecting nested iframe - selenium / javascript / node-js

I want to select a nested iframe within an iframe with the selenium webdriver module in node-js. For example: <iframe id="firstframe"> <div id="firstdiv"></div> <iframe ...
1
vote
1answer
20 views

NodeJS passing an extra param to a callback

I'm a begginer in Node.JS and as a first tryout i'm implementing a small url shortening service that will get a request with an id parameter and redirect to the actual url after searching a cassandra ...
0
votes
2answers
61 views

Get Node.js to get user's input from a HTML text field?

I've basically been trying to make a simple game where the user can submit their high-score to a Node.js server. I'm just trying to do something very simple but can't seem to find much to help me ...
3
votes
0answers
40 views

Array.push.call on window / global and numeric properties

When I run this line of code : > var new_arr_length = Array.prototype.push.call(this, null); I get very strange results. The MDN documentation says that push() should return the length of the ...

15 30 50 per page