Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript engine. Node.js is commonly used for heavy client-server JavaScript applications.

learn more… | top users | synonyms

0
votes
0answers
46 views

first node.js app. how can i improve it?

i just wrote my first node.js app, and would love some feedback on how i could improve it! run.js var https = require('https'); var mgr = require('./domainQueryMgr.js'); ...
0
votes
0answers
10 views

express, blade with connect-assets

i have this coffee script code running http://chapter.zmgc.net (https://github.com/TZM/tzm-blade)and would like to have your opinion on how better to optimise it. express = require "express" gzippo = ...
3
votes
1answer
68 views

Is there a better way to enforce separation of concerns in this Node.js program?

I've been writing a node.js web crawler, to get it running, I've found myself having to string together really rather a lot of different npm modules. I've done my best to keep the code DRY and well ...
1
vote
2answers
151 views

Javascript: How to handle an unknown number of arguments?

I'm writing a function that takes between one and three arguments (function callback [, number limit] [, regexp pattern]). Since the second two are both optional, I need to determine which arguement ...
2
votes
1answer
24 views

Can this MongoDB query be optimized further?

Most of my slow queries on my server are due to a single "find" query. I have a collection that represents website pages. I want to be able to look up a page in the collection by URL. The caveat is ...
1
vote
0answers
163 views

Simple Telnet Chat Server nodejs (correct way to write programs in node.js (asynchronous programming model))

I am new to node.js and asynchronous programming and this is my first small project to learn it. I have written a small Telnet Chat server and the program works but I want to know if this is the ...
0
votes
0answers
48 views

Node.js object-oriented controllers

I've been experimenting with the Express Node.js framework. On the face of it, the approach of passing functions to app.VERB methods seems unusual. In other frameworks I've used (in languages other ...
2
votes
0answers
44 views

Node + Express Code Critique?

I'm learning Node. I'm working on a personal project that uses Node + Express + Node-Mysql + Generic-Pool (for mysql pooling). I am new to the idea of module.exports and I'm still grokking it. The ...
0
votes
0answers
46 views

GitHub browser/node.js JavaScript project review

I'm quite new to GitHub. Like others, I usually download libraries from it but recently decided to host a small library on it. It would be great to get comments on its usability and code structure. ...
1
vote
0answers
56 views

Socket.io, Express and Delivering realtime data from backend socket

I've got ser2net running to make serial data available on a TCP/IP port. My goal is to collect data coming from a realtime device connected to the serial port and deliver it to web clients connected ...
1
vote
0answers
104 views

Express app single page web application – client and server-side templates for before and after login

I am building a single page web application with Express.js on the back-end. However, I want to keep the login/register/homepage to the application (before you login) separate from the single page ...
1
vote
1answer
46 views

How to organize logic like: check if file exists, if it's not a directory, then do something

While I'm aware that code with callbacks tends to be complex I'm wondering is there any patterns or something to improve my situation. All I do here is checking if file is exists and it's not a ...
0
votes
0answers
303 views

User management in Node.JS

I have moved all my webserver code dealing with user management into a single Node.JS module that I paste below. I have spent time polishing it, and churned it through JSHint. I am generally happy ...
0
votes
0answers
100 views

Simple Node.JS server

I am in the process of writing a simple Node.JS webserver. I am about half-way there in terms of functionality. Please see the full code in this pastebin (the client-side code is not shown as I want ...
1
vote
0answers
48 views

Does this nodeunit test conform to best practices?

I have inherited a node-js project, and I am completely new to it. Fortunately, it is already covered by unit tests. The class under test, FmsRescuers, has the responsibility of sending HTTP requests ...

1 2 3
15 30 50 per page