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
1answer
40 views

How to avoid circular patterns in Node?

I'm new to Node and JavaScript (well, asynchronous programming in general) and I noticed when I was working on a project that the following code is a circular pattern and that these are bad practice ...
-2
votes
1answer
46 views

(New Programmer Alert) As I'm learning Javascript and Jquery What Else Should I learn? [on hold]

I'm a new programmer and kind of over whelmed by all the other awesome stuff there is to learn. I've gotten HTML and CSS down and now want to make my websites more interactive. I know with Javascript ...
0
votes
0answers
31 views

Emulating `tail` to stream log data via asp.net mvc

In similar fashion to this bit of node.js, I'm interested in streaming the ongoing output of a text log file via ASP.NET MVC. I'm having trouble even thinking how I would implement this using the ...
1
vote
1answer
49 views

composer is self-described as inspired by npm, so why does it handle sub-dependencies differently? [on hold]

As I'm sure anyone reading this knows, the default behavior for npm is to install sub-dependencies within their respective sub-dependency directories themselves (in a new node_modules directory). The ...
-2
votes
0answers
20 views

How can I estimate the server load per user for a streaming application before I launch it? [on hold]

What methods exist for calculating / predicting server load per user before the application is launched publicly? I'm using a node.js back-end on an Amazon EC2 Linux server. I need to calculate ...
2
votes
0answers
45 views

Mapping different XML and CSV feeds

Not sure if this is the right venue to be asking this but here goes. A little background. I'm trying to build an ecommerce app that would allow sellers from other venues--like, amazon and newegg--to ...
2
votes
2answers
55 views

Reading using non-blocking IO on a fd asynchronously in C++ (moving from Node.js)

I'm trying to switch my brain from Node.js/Objective-C iOS programming to C++ programming, and it's a little bit taxing. Node.js and Objective-C with iOS do not have a run loop that I am supposed to ...
1
vote
1answer
62 views

Best place to declare functions in this example

Suppose I have code that accepts html GET requests: server.get('path/to/some/endpoint', function(req,res) { function a() { //function goes here } } Is it better to declare functions ...
1
vote
1answer
92 views

Polyglot Node.js with Typesafe Akka for Actor Model

I have a case that needs to manipulate a large stream of JSON and inject it into Apache HBase. Our system works on Node.js with Mongo then, since we need to enhance performance, so HBase is choosen to ...
1
vote
0answers
32 views

Best way to traverse data and update nodes in Mongo DB

I am using Angular Tree View in my web app. Data coming from the server is build with https://www.npmjs.com/package/mongoose-materialized getArrayTree() function. What I need is, syncing the ...
4
votes
3answers
260 views

What's special about “non-blocking” node.js?

In the short chapter, What is Node by McLaughlin, he writes: "Node has no blocks, no threads competing for the same resource (Node is happy to just let things happen however they happen), ...
-2
votes
1answer
24 views

How to transfer contexts among separate node.js environments? [closed]

Lets suppose I have my app running on machine A, at some point I need to shut down that machine, and transfer my app to machine B to continue its process. so I need to be able to save and restore ...
0
votes
3answers
168 views

What is the best way to go about storing application options: file system or db? [closed]

We are looking to find the best way to store user options (skills, degrees, industries, languages, etc.) for drop downs. The options are between a JSON file we can store on the server file system or ...
1
vote
1answer
38 views

What information should go into file-level document block?

I primarily develop for Node.js. I got into a habit of putting a file-level docblock into all of my .js files. It looks something like this: /** * project-name * * Licensed under the BSD-3-Clause ...
0
votes
0answers
82 views

Why would I need node.js to run a javascript library?

I'm interested in using sigma.js, and I'm looking at the instructions here: https://github.com/jacomyal/sigma.js/wiki One of the prerequisites is that node.js is installed. If it's a client side ...
2
votes
1answer
252 views

Node.js and CPU intensive web applications

Some time ago I made this question about porting a Silverlight application to web. We lack experience working with web applications and have started to look for training and resources. We have noted ...
0
votes
2answers
97 views

Middleware dependencies

I'm trying to convert a legacy PHP app to use the middleware paradigm, similar to connect/express.js. I've started porting the code into separate middlewares so that every feature is neatly self ...
0
votes
0answers
30 views

Synchronizing content between web-based app and game server

I have a MUD server, written in C, that I'm trying to move from file-based storage to MongoDB. Eventually, I'd like to offload administration of game content and settings to a web console, written in ...
2
votes
1answer
109 views

How to design a serverside heartbeat with nodejs?

I would post this on http://stackoverflow.com/, but figured I am not looking for code, just an idea how to accomplish this. I have a gameserver that interacts with nodejs and uses the websocket ...
1
vote
0answers
81 views

Proper usages of rooms/namespaces when making a News Feed with socket.io

I am working on making a News Feed for a piece of software that will have data posted to different hierarchical levels within the software. For example, the software will support multiple ...
1
vote
0answers
157 views

Is it a bad practice to compile TypeScript NodeJS app to a single JS file?

I'm currently exploring TypeScript and I was wondering why not compile the whole app to a single JS file instead of compiling every .ts file to it's corresponding .js. Example for such an app is ...
-1
votes
1answer
21 views

Looking for a node library that can help find string similarities [closed]

For example, I have the strings "Bat", "Spider", "Alien" as my data, and I feed the string "Batman" into a function. I'm looking for a module that would compare the similarity between the input string ...
-1
votes
1answer
48 views

node deep file indexer module cannot go deep [closed]

I'm trying to make a file indexer by node.js. The program is supposed to index files and folders in an array and also check inside folders and add all sub folders and files I wrote: ...
0
votes
0answers
16 views

NodeJS Tool to control request / response flux

I m actually facing a problem with my NodeJS api with a "Cant send headers after they are sent", in a special case. To bypass this and to check a bit deeper inside nodejs, I wanted to know if there ...
0
votes
1answer
159 views

Moving from C++ to NodeJS - Working with XML and JSON

I need to make a program to compare several large +100MB XML files, find the difference, and spit out JSON. I have written the comparison code in C++ and it performs great but now when I am getting to ...
1
vote
1answer
101 views

What is the purpose of separating routes into individual modules with Node.js and Express?

My app uses Node.js and Express 4 and has the following code in the app.js file located in the root directory: var express = require('express'); var index = require('./routes/index'); var users = ...
-3
votes
1answer
206 views

using node.js server with mysql-module and PHP for a penny-auction website? [closed]

I'm building a penny-auction platform like DealDash and just read into the WebSocket and node.js topic. I used PHP, MySQL and Ajax to build the website. I'm nearly finished and just have to implement ...
1
vote
1answer
352 views

Correct usage of Bluebird promise

This is related to this question on promise performance. The current top answer states that using new Promise is an anti-pattern in bluebird And that promisify should be used instead. I ...
0
votes
0answers
66 views

How to design a server that does not interrupt downloads?

I'm building a Node server that serves large files for download and streaming. It will be necessary to modify these files on occasion, sometimes in bulk with a script. I want to be able to update them ...
0
votes
0answers
134 views

Is this MEAN stack design-pattern suitable at the 1,000-10,000 user scale?

Let's say that when a user logs into a webapp, he sees a list of information. Let's say that list of information is served by one of two dynos (via heroku), but that the list of information ...
0
votes
2answers
67 views

Why should we expect user-space coroutines to be lighter than OS threads?

I have heard it said that managing concurrent TCP connections using user-space coroutines uses less resources per open connection than using an OS thread per connection. Actually, OS threads and ...
1
vote
1answer
116 views

Will simply adding a 'Allow Cross Origin Requests' to my node app work?

I'm trying to make a 'frontend web scraper'. I had the idea of setting up a node app that had a dynamic route that used Request (the NPM package) to scrape pages and displayed them as it's own. Then ...
0
votes
1answer
403 views

How to create a JSON or HTML file that dynamically mirrors file directory structure for jsTree 3.0 [closed]

I am looking to create a JSON OR HTML file that will accurately give the folder/file structure for a directory for use with jsTree 3.0 (www.jstree.com). I want to make it AJAX/lazy load so that each ...
1
vote
3answers
137 views

Executing scripts in parallel based on dependency tree

We have an app that is using a fairly simple stack (Linux, PHP, Oracle, Shell Scripts, etc). We have a series of scripts that need to be executed: /scr/app1/start.sh /scr/app2/start.php ...
2
votes
1answer
94 views

Is Current CoffeeScript Module Pattern Valid?

I have a Node.js web application that's written in CoffeeScript, which has a set of "services". These various services are currently exposed as a CoffeeScript class, which does a few things that I ...
1
vote
1answer
281 views

Assigning default values from environment variable in Node.js

When attempting to set default values for parameters that may exist in environment variables in JavaScript, I often see this pattern: var lag; try { lag = process.env.THROTTLE_LAG; } catch ( e ) ...
1
vote
0answers
208 views

Preserving Pre-formatted Multi-Line Strings in Node.js Scripts

There is a lot I don't like about PHP, but one thing I love is multi-line strings: $query = <<<EOT select field1 ,field2 ,field3 from tableName where field1 = 123 EOT; ...
-1
votes
1answer
133 views

How to connect mean.js to AWS S3

I am trying see how I can upload images and file to aws S3 via the mean.js framework. I am not sure how the backend is linked to S3. There are no resources online about this specific framework and ...
1
vote
0answers
45 views

Handling thousands of cassandra insert/updates

I have mobile app with backend server running in nodejs with cassandra as database. The app is like social network where you can share pictures and follow other people. Some operation like updating ...
1
vote
0answers
60 views

Help design this data import program

I want to import some data from various locations and pump it into MongoDb and some cloud services. The data starts off as JSON, I read that JSON, create some objects in mongo, go to the next level ...
5
votes
2answers
682 views

Where is the evidence for the performance of Node.js?

A lot of developers, especially ones who haven't used Node.js in production, seem to believe that Node.js is faster than other interpreted languages such as PHP, Python, and Ruby. These claims ...
0
votes
1answer
143 views

Should I prefer classes or singletons in JavaScript/Node?

This question applies especially to Node.js, but also to JavaScript in general. I started working on a simple web app in Node.js. I'm relatively new to Node and JavaScript, and come mainly from C# ...
0
votes
1answer
32 views

Image uploads - preoptimize with CDN or host on same machine?

I'm working on a personal blog that will be used for reviewing various goods/services and as a dev journal. I'm writing this in Angularjs and Nodejs as a learning experience, but I plan on using it ...
-4
votes
2answers
279 views

Turn on gzip on nginx, upstream (nodejs) or both? [closed]

I have an application running behind a proxy, both on the same machine. Which approach is more suited regarding compression, while preserving reasonable performance. turn on compression at the ...
1
vote
2answers
154 views

How can I ensure my JavaScript code will run in both Node.js and Io.js [closed]

With the danger of fragmentation due to the fork in Node, how can I make sure a "Node" project will run across both Node and its fork? The hope is that they will join together again once Joyent and ...
1
vote
0answers
327 views

Separation of web server and stateless REST API

Currently, I have a single Node server that provides both (a) stateless API routes returning JSON, and (b) session-based web routes. My API routes and web routes have started sharing a lot of code, ...
1
vote
0answers
161 views

vert.x message bus architecture

A large part of the vert.x architecture is around the message bus, and message passing between verticals. The main idea I guess being that I can create multiple modules (possibly in multiple ...
1
vote
1answer
75 views

Compose nested EventEmitters elegantly

I am developing a server-side JavaScript tool, and trying to do so in a modular way. I have a Parser class that is an EventEmitter - you call parse and it will eventually emit data and end events. It ...
5
votes
1answer
506 views

What is the best way to format complex SQL queries in Node?

I am using node-mysql to query a MySQL database via Express and Node. My queries are getting fairly complex and I want to format them across multiple lines. However, the only way I could accomplish ...
-1
votes
1answer
95 views

Is there a convention about the standard port for testing and developing in node.js?

I'm trying to get started with node.js. For example en Java and .net programmer often use the port 8080? Is there a convention like that in node.js? I know that any port above 1024 will do it but I ...