Node.js is an event-based, asynchronous I/O framework that uses Google's V8 JavaScript engine.

learn more… | top users | synonyms (1)

0
votes
0answers
24 views

How to transcend node.js' primitive require system

background I've written some node.js code and it always strikes me how primitive the namespacing seems to be. Maybe I'm missing some of its more advanced functionality. It seems that there should be ...
-2
votes
0answers
32 views

Where does this node.js code actually lead to closing a file close [on hold]

Background Well, this is my first question on this site, so I hope it goes well :) I post it here because it's more of a code review question than a question about how to accomplish a goal. Winston ...
3
votes
1answer
74 views

Testing gap between unit and integration: Integration in the Small, Component, Unit Integration Tests

Over the past few weeks I've been mulling and researching how to fill a gap in our testing methodology. In simplified terms unit tests are too small and traditional integration tests are too big. A ...
0
votes
0answers
47 views

Building SQL from multiple combinations of query parameters [migrated]

I have a node.js/express.js based REST application. In one GET service I am querying data based on different set of request parameters. I am looking for a better way to implement it. Following is my ...
0
votes
1answer
46 views

Wrapping function in closures to make testable functions

In my nodejs project, I have functions like this for socketio. socket.on('draw', function (data) { socket.broadcast.to(socket.room).emit('draw', data); addEvent(socket, ["draw", data]); }); ...
0
votes
2answers
114 views

confusion on using nodejs within an actual web application or ide

I am new to using nodejs completely, and it seems to be pretty much the go to thing for everything right now. But I program in Visual Studio, and I'm a bit confused about how this works. I will cite ...
-1
votes
0answers
30 views

Nodejs Best practices: scheduling task with scalability in mind

I have two apps that need to run scheduled tasks. One will charge users on a monthly basis with forte, the other will push to an api possibly multiple times a day. Each app will do so for multiple ...
2
votes
2answers
52 views

How to handle versioning with multiple independent pull requests in a Git repository?

Let's say Alice has a Git repository, and the version is kept track of inside the repository (let's say package.json for npm). Bob sends a pull request to Alice which increments the version number ...
-3
votes
1answer
117 views

Would you get better performances by coding an application in C, then compile to JavaScript? [closed]

I am writing an interpreter for a functional programming language that is going to run in the browser. Needless to say, performance is the one and only concern in this application. Emscripten is an ...
0
votes
0answers
29 views

Declarative Transactions in Node.js

Back in the day, it was common to manage database transactions in Java by writing code that did it. Something like this: Transaction tx = session.startTransaction(); ... try { tx.commit(); } catch ...
2
votes
0answers
53 views

Managing setTimeouts and setInterval in a distributed environment

I am building a turnbased game on nodejs using socket.io and redis as the datastore. I am planning on hosting the game on AWS opsworks with the ability to scale by adding more nodes. How should I ...
0
votes
1answer
69 views

How to unit test models in MVC / MVR app?

I'm building a node.js web app and am trying to do so for the first time in a test driven fashion. I'm using nodeunit for testing, which I find allows me to write tests quickly and painlessly. In this ...
1
vote
2answers
138 views

How to represent a tree structure in NoSQL

I'm new to NoSQL and have been playing around with a personal project on the MEAN stack (Mongo ExpressJs AngularJs NodeJs). I'm building a document editor of sorts that manages nodes of data. Each ...
3
votes
1answer
214 views

How significant is node's advantage of training developers in only one language and putting them on tasks across the tech-stack? [closed]

I have recently joined a startup as CTO/co-founder. The startup and I have been thinking about moving the existing codebase (which is in PHP5.5, laravel framework) to node.js . Main reason for this ...
0
votes
0answers
244 views

How to parse multipart field/file data separately?

I want to parse a multipart form twice: Once to grab the incoming fields, and later to process the file upload. I am trying to maintain a proper separation of concerns within my Node app: ...
1
vote
0answers
105 views

How to authenticate user on php and Node.js

I´m currently developing a little chat page. The main page and user management is written in php and also all the authentication stuff with sessions. Now I´m planning to run the messaging stuff on a ...
4
votes
3answers
247 views

Dividing responsibilities between client and server

I'm working on a Web app that uses node.js on the server and AngularJS on the client. I'm new to Angular, but enables writing client-side applications that can be more self-contained than some other ...
0
votes
2answers
115 views

Programmatically syncing with remote servers

My application generates text files that need to be synced with remote servers, which may be windows or linux. Sync has to happen without user's intervention. I tried with rsync but windows doesn't ...
0
votes
0answers
47 views

Optional dependencies in npm?

I have a similar question to this, but not quite the same. I would like for the user of my app to install it with whatever dependencies are needed for the way he would want to use it. So, for ...
2
votes
1answer
217 views

How can I keep Web services requests in a DAO layer without tying the code to the DOM?

I'm working on a single page application on the node-webkit desktop app platform, which means 99.9% of all of the logic is written in JavaScript. Since this is a reboot of a project we're working on, ...
0
votes
1answer
55 views

What to test in this project?

Every developer advocates test-driven development, but I am coding a website in NodeJS and I am not testing my app. This is not because I don't see any reason. I know it allow me to check at each ...
0
votes
0answers
90 views

Is my application secure enough

first of all, I don't have any code to display in my question here, because I'm still designing the application structure, so i only got design developed. I'm building a phone application that I'm ...
0
votes
0answers
50 views

How to store progress of abstract events?

I making a game in node.js. I have players and they can perform a lot of actions. Actions are all coded as functions, and they change certain variables in either User object or other objects that ...
1
vote
2answers
280 views

Developing a dynamic site with Node.js [closed]

I'm trying to get some pointers on what the best methodology to follow for a web application would be. First, some background: I've built two different APIs using Node.js where Node serves the data ...
3
votes
1answer
252 views

Utilising Promises, Closures and Recursion in Node.js

I have employed a recursive call to a closure in order to mitigate against some race conditions I am getting (That's what I think it is). I'd like to know if (and why) this is a good solution or a bad ...
1
vote
1answer
144 views

Is parsing a submitted JSON object safe?

I have a RESTful API, built in NODE.js that does what you would expect it to: consumes data and then makes it accessible. Currently, data being submitted to my server is nested form data: ...
0
votes
2answers
437 views

Understanding Front End vs Back End Javascript?

I've been noticing lately, as I've played around with javascript, HTML5, and node.js for the first times that javascript seems to be a language that is used very differently (and with different ...
0
votes
2answers
147 views

Making server logic independent of client interaction

I'm trying to make a realtime multiplayer web-game in node.js with express framework and socket.io library. But I can't seem to make my server-side logic independent of client interactions. I want ...
0
votes
0answers
274 views

Looking for changes in a MySQL database with node.js for a live dashboard

So, I work for a NOC in a small ISP. We're planning on getting a large wall mounted monitor and I'd like to make a dashboard in Node.JS - I've never used node before so it should be interesting. I'm ...
0
votes
1answer
158 views

Design questions for a Node.JS based Dashboard

I checked with meta and apparently this is the best place to ask! The company I work at have many environments, and as such, many Nagios/Icinga etc boxes in each environment. We currently have a ...
1
vote
3answers
337 views

Why should I use node.js as http server?

I know what node.js is & what it does. What I really want to know is how does it work as an http server? A server like apache gets a request, fork a process, allocate memory to process, handle ...
4
votes
2answers
212 views

Why might I switch from ASP MVC to Node/Express?

So I've been wanting to try Node and Express. Not to mention Jade and Stylus. Webstorm has in my opinion an amazing user experience and I want to use it and these technologies. Here is where I get ...
0
votes
0answers
147 views

How can resolve an URL on a specific DNS server

I'm currently facing a issue on a project. I'm resolving URL's on multiple DNS servers using a node.js server. Until here, everything is fine. But some ISP restrict the incoming requests from IPs ...
2
votes
0answers
144 views

scaffolding a multi-angular-app portal with usersystem

I'm trying to find the best way of developing a portal that a user can log in to and then be presented with a range of different apps (angular). They should share the same api-backend. I think that ...
0
votes
3answers
361 views

Finding Node.js developers [closed]

We're at the beginning stages of a new startup and will most likely be utilising Node.js as it is the most appropriate technology for the job and we like the idea of JS for both server/client. My ...
2
votes
4answers
593 views

Call the database every time, or create an object in memory, and if so, how and how often to update?

I'm creating an app in javascript/nodejs and using neo4j as database. Let's say I have an entity User in my database. It has a bunch of properties, like boxes_collected and places_visited, which keep ...
0
votes
3answers
900 views

Are (mostly) client-side JavaScript web apps slower or less efficient?

I am in the midst of writing a web application for work. Everything is from scratch. I have been a PHP programmer for about 13 years, Node.js programmer for the past 2 years, and have no shortage of ...
4
votes
1answer
216 views

nodejs chaining with async

I'm trying to chain a series of methods that are async. I have heard of promises and futures but what I'm looking for is: obj.setup() .do_something() .do_another_thing() .end() and not: ...
0
votes
1answer
195 views

Listing dependencies in the package.json for a node.js app on Heroku

I previously had an issue with my node.js app on Heroku. I added the dependency into my package.json and now it is working. But, is this the best way to do it? { "name": "application-name", ...
-1
votes
1answer
163 views

Intranet application platform decisions wamp vs node [closed]

I have a client/server java application with a firebirdsql backend. This is a pain because I have to install java and the client on every workstation, etc So it is now time to rewrite the ...
13
votes
3answers
1k views

Novice to node.js, what is the advantage gained using callbacks over events?

I am a novice JavaScripter and have no real knowledge of what goes on inside the V8 engine. Having said that, I am really enjoying my early forays into the node.js environment but I find that I am ...
1
vote
1answer
197 views

How to build an API on top of an existing Rails app with NodeJs and what architecture to use? [closed]

The explanation I was recently hired by a company that has an old RoR 2.3 application with more than 100k users, a strong SEO strategy with more than 170k indexed urls, native android and ios ...
8
votes
2answers
698 views

Dealing with the node.js callback pyramid

I've just started using node, and one thing I've quickly noticed is how quickly callbacks can build up to a silly level of indentation: doStuff(arg1, arg2, function(err, result) { ...
-1
votes
2answers
669 views

Rails/Node.js interaction

I and my co-worker are developing a web application with rails and node.js and we can't reach a consensus regarding a particular architectural decision. Our setup is basically a rails server working ...
0
votes
0answers
96 views

Problem with OAuth2 authentication process and session persistance

We're using node-oauth2-provider as an authentication library for our service. The current process for a user to log in is: POST /oauth2/access_token Which creates and saves the access_token to the ...
0
votes
0answers
145 views

What is the best procedure to setup real-time data transfers with Redis?

I have setup a RESTful API using Ruby on Rails for an iPhone application.There are some instances, however, that I would like to use Real-Time Pub/Sub data-transfers, I have drawn up 2 potentials: ...
-3
votes
1answer
373 views

Real-World node.js [closed]

I am 14 years old, and have been studying web/app/software development. I am trying to learn a backend language, and am considering node.js. I have heard awesome things about it, plus I like that fact ...
1
vote
2answers
370 views

Search algorithm

I would like to create a site where users can post articles with the following optional parts: A title Contents (text) Categories Keywords Articles will be stored in mongodb and the site will be ...
0
votes
1answer
58 views

Should I include test runner module as a dependency in my module?

My module has no dependency on its own but for running tests you need to install jasmine-node module. Should I include that module as a dependency?
1
vote
2answers
2k views

What is a reasonable way to structure relationships in MongoDB

I am also using Node - which I am not the most familiar with - if the articles/books/tutorials pertained to this also - that would help even more. I come from a mostly MySQL background - but in this ...