0
votes
0answers
13 views

POST error being ignored even though it validates

Hey I have a POST for when a user Profile is updated but I was wondering if anyone knew why the error and validation is being ignored? Not sure what is wrong with my code? Also, for some reason the ...
0
votes
0answers
9 views

HTTP Server on Android via node.js errors upon request

I'm running node.js v0.11 on Android (via https://github.com/paddybyers/node). I attempted to try out the "Hello HTTP" example found here: http://howtonode.org/hello-node, however, I ran into ...
0
votes
0answers
6 views

Using forever to run node peerjs server on port 3000?

I am setting up forever to run my node peerjs server, but forever is not starting the peerjs server on port 3000. Here is how I am using forever to run my peerjs server: forever start -a ...
0
votes
1answer
24 views

How to use AJAX with node.js

I am relatively new to server side programming, however I am building a framework in order to learn and as end outcome deliver it to the public after it is finished. I want some parts of the web ...
0
votes
1answer
21 views

Redirection issue with Node, express, and angular

I have an app running in node, express, and angular. It has 2 pages, a user profile page and a login page. I want to make it so that if the user is not signed on and when the profile page is reached, ...
0
votes
1answer
23 views

How to emit to room in socket.io?

How can I emit a request from a server to the client, to only one client... I know that io.sockets.to(room).emit('event' data) exists, but I don't hear about socket.to(room).emit
-1
votes
1answer
39 views

Regex: How to match all function calls except test()?

I'm reading some file contents and I want to match all function calls that is not test() in nodejs. test() can have any type of parameters and as many as possible. And all matched functions should ...
-2
votes
4answers
43 views

Asynchronous call to synchronous function

Lets say I have an synchronous function for example: var sum = function(x,y){ return x+y } I want to call this function in asynchronously. How is that possible? Is the function below be ...
0
votes
1answer
10 views

Websafe encoding of hashed string in nodejs

I am creating a re-director of sorts in nodejs. I have a few values like userid // superid these I would like to hash to prevent users from retrieving the url and faking someone else's url and also ...
0
votes
2answers
22 views

Variable suddenly becomes undefined in the callback to an Angular $resource function

I'm building a function in Node that queries my mongoDB database and returns some results into an object. I'm having trouble getting the object set up correctly though. Here's my code: Function to ...
1
vote
1answer
24 views

How do do a callback after redirect in expressjs

I am redirecting to a page using res.redirect('/pageOne'); so after the redirect i want call a function , But when i called the function res.redirect('/pageOne'); callBack(); I found that the ...
0
votes
1answer
23 views

Why does my decipher.final fail given an incorrect key?

Problem and App BG: So I'm creating a nodeJS application which stores some sensitive data, and I would like to encrypt everything. But when I try to decrypt some data with the wrong key, I get a ...
0
votes
1answer
7 views

Multiple Partials Using Express-Partials On One Layout

I am using Node.js and ExpressJS 3.0. Moving to 3.0, I found that partials were no longer supported and subsequently found express-partials to provide similar functionality. Looking at the example ...
0
votes
1answer
49 views

How do you avoid a crash if someone tries to access a page without loging in?

Hey so when I try to go to a page that cannot be accessed without logging in, the app crashes. How do I avoid this? The reason why it crashes is because when they try to access that page, the page ...
0
votes
0answers
47 views

Node JS cannot post error?

I am unsure as to why I am getting an error for POST-ing a form. I am using mongoose to connect to mongodb and using Jade as my view engine. I am trying to POST an update and not a new account into ...
0
votes
3answers
27 views

Getting access to data in jade template (to make static html)

I am trying to pass some data to jade template to generate static content. I do not know much about node.js and express, I don't use them as backend. I use jade as a template engine and to generate ...
1
vote
0answers
17 views

RemoveAllListeners() does not delete $events attribute?

I built a simple clientside logger which prints all current active socket.io listeners on my page. I'm getting this information directly from the socket object and the inner $events object. The ...
0
votes
1answer
14 views

node-orm2 instance lacks save method

I'm new to using node-orm2 and am getting caught by the following issue; TypeError: Object [object Object] has no method 'save' Full stack trace http://pastebin.com/cb9Lt9pB This error is coming ...
1
vote
1answer
63 views

Not phased work. Is it normal?

For example, after a complex cycle that processes the data from the database and writes them to a certain array, I need to process the data from the array. What happens is that the function of array ...
1
vote
1answer
16 views

Writing unit testing for a module that creates Json REST services

I recently finished up https://github.com/mercmobily/JsonRestStores. I feel a little uneasy as I haven't yet written any unit testing. The module is tricky at best to test: it allows you to create ...
1
vote
2answers
30 views

Scenarios for Re-using Variables within the Same JavaScript Function: Always a No No?

I've just finished writing a script for parsing csv data. Having recently installed JShint, it's been badgering me about the re-use of variables. I've been using JS a fair bit lately, but I come from ...
0
votes
0answers
9 views

How do I verify origin url on einaros' ws websocket package

I've tired the code below it isn't worked: var WebSocketServer = require('ws').Server; var wsServer = new WebSocketServer({port: 8080}); wsServer.on('connection', function(ws) { if (ws.origin ...
0
votes
4answers
42 views

Browser-based app needing IO control

This is a question about the best way to structure an app that has both server-side and client-side needs. Forgive the length -- I am trying to be as clear as possible with my vague question. For a ...
0
votes
0answers
16 views

node + express + mongoose query authentification

Im building a simple web app app in express, and I'm a bit stuck in the authentification for my sessions, im going to validate everything in the client with backbone and regExp eventually when i start ...
0
votes
0answers
36 views

$ is not defined even though I'm definitely loading it first

This is my html <!DOCTYPE html> <html> <head> <script src='./JS-LIBS/jquery-2.0.0-min.js'></script> <script src='./app/app.js'></script> ...
1
vote
2answers
36 views

How to get Nice-Looking URLS - Node.JS

I have been looking around the web for a way to get the URL that is like: example.com/games/game1 instead of example.com/games?id=game1 I have looked around the Node.JS website but I couldn't find ...
0
votes
1answer
19 views

timeout exceeded error in Async Mocha tests

I am using Mocha and should for testing simple database queries, I am trying to run Async tests for simple Moongose schema functions, but I am getting timeout exceeded error everytime. Error: ...
0
votes
0answers
35 views

JavaScript - Node.js server don't show image

I am with a problem over here, I am using node.js framework to handle the requests to my index.html. The index.html file has some images, but its not appearing for my users! I am reading both files, ...
0
votes
1answer
24 views

Leveraging heroku in node.js

I've been looking for a PaaS provider for some time, nodejitsu seemed promising but doesn't offer some of the features I'm looking for. I need the ability to process a lot of data quickly for a lot of ...
0
votes
2answers
29 views

Async and recursion in nodejs

Beginning with express and mongoose i often need to do some batch operations on collections. However it usually involves callbacks which is a pain given how concurrency is coded in nodejs. so ...
0
votes
1answer
9 views

Node EventEmitter to EventEmitter emits. Multiple emitters

I am trying to emit from one EventEmitter to another EventEmitter, or find an alternative solution. The code below doesn't function. Multiple emitter example var events = require('events'); var ...
1
vote
2answers
33 views

Starting and stopping child processes from main process only when needed in nodejs

I'm somehow new to nodejs and child processes and coming into some trouble now within my application. Something about the background: I have a nodejs-Websocket-Server working that loads a HTML page to ...
0
votes
0answers
30 views

When namespacing I receive a “cannot GET error” displayed in browser

I'm using namespaces to differentiate between version of my socket.io chat app, and I'm having trouble with a "cannot GET error displayed in browser." I plan on continually updating a chat app I made ...
0
votes
1answer
26 views

delete specific xml node Javascript

My xml file is like: it contains different 'object' nodes and in different objects there are different parameters one is deleted parameter. I want to delete the all 'object' nodes that contains the ...
0
votes
1answer
16 views

Node.js exec with wget

I'm trying to download a lot of files using nodejs and the exec command, simplified like this: var cmd = 'wget -O output.csv URL'; var child = exec(cmd, function(err) { console.log('DONE'); }); ...
0
votes
2answers
45 views

node.js - how to write an array to file

I have a sample array as follows var arr = [ [ 1373628934214, 3 ], [ 1373628934218, 3 ], [ 1373628934220, 1 ], [ 1373628934230, 1 ], [ 1373628934234, 0 ], [ 1373628934237, -1 ], [ ...
-2
votes
2answers
72 views

Can javascript read webpage? [on hold]

can my page Javascript read same page which itself is loaded? Like other parts of page are dynamically loaded by other provider. I have tried many things, google as well, but now I am in doubt that it ...
0
votes
1answer
41 views

Coffeescript + node.js : Unexpected token > (function arrow)

When I try to run the following coffeescript code: request = require('request') request('http://google.com', (error, response, body) -> if not error and response.statusCode is 200 ...
0
votes
1answer
29 views

onmessage event in websocket client is not getting fired

I am using node.js to implement websocket server and client. The handshake between them looks like this. Request URL: ws://localhost:8015/ Request Method: GET Status Code: 101 Switching Protocols ...
1
vote
3answers
60 views

Why is node.js asynchronous?

Nobody has actually asked this (from all the 'suggestions' I'm getting and also from searching before I asked here). So why is node.js asynchronous? From what I have deduced after some research: ...
0
votes
1answer
26 views

Is NodeJS Image Processing/Analysis Possible?

I'm running NodeJS on the server-side, and I'm trying to do a bit of automated image processing to determine the 'base colour' of an image. Here are the steps of what I want to do: Take an image ...
1
vote
2answers
53 views

How do I write a client side Java script to run on a Node JS server

I was trying to run a simple client side javascript code in my Node JS server. But failed. My index.js file looks like below response.writeHead(200, { 'Content-Type': 'text/html'}); ...
0
votes
1answer
33 views

How do I validate a form being filled out in Backbone?

So I have a new form set up it saves temporarily and all but I want it to only be able to update when it is validated otherwise show some errors. This is during the view section for the saveEdits ...
1
vote
1answer
15 views

Import in Javascript

I have seen several imports here: https://github.com/mbostock/d3/blob/master/src/svg/axis.js If I try to search for documentation about how that may be made all the results I get are of the kind: ...
1
vote
0answers
15 views

WebRTC Data Channel server to clients UDP communication

Is it possible to use WebRTC Data Channels on Node.js in a way that mimics the functionality of WebSockets except using UDP? In essence I want to have a server running Node.js with which browser ...
1
vote
1answer
46 views

Difference between readFile and readFileSync

The following code outputs the content of the index.html (it just contains the text hello world) to the browser. However, when I replace readFile with readFileSync, the request times out. What am I ...
2
votes
1answer
77 views

Go vs JavaScript JSON parsing

Recently, I needed to parse the JSON that the Chrome web browser produces when you record events in its dev tools, and get some timing data out of it. Chrome can produce a pretty large amount of data ...
0
votes
2answers
56 views

What goes where? node.js, express, dojo, JQuery

I'm new, so bare with me. I'm not from web-development or high-level languages, and don't understand how some parts of web-development stack fit together. I'm researching possible stack ...
2
votes
1answer
29 views

Session Undefined - Using Connect-Redis / ExpressJS / Node

This morning I awoke to find Nodejitsu spinning out the following error: Warning: connection.session() MemoryStore is not designed for a production environment, as it will leak memory, and will not ...
0
votes
0answers
10 views

Installing NodeJS via Maven

I see a lot of newer Maven plugins for JavaScript require NodeJS to be installed on the machine where the build takes place (both local and CI servers). For example: yeoman-maven-plugin, ...

1 2 3 4 5 146
15 30 50 per page