0
votes
0answers
23 views

Node.js: Is this factory method a good approach?

We are beginning to learn Node.js and we are not always sure if we do it the right way. We have a strong object oriented background so the adoption is not always easy. Right now we implemented a ...
-1
votes
0answers
24 views

ExpressJS Web Application - Getting Input from User [closed]

Im new to NodeJS and ExpressJS. Kindly review my code in getting input from the user. Please include best practices, conventions in NodeJS, ExpressJS and JavaScript. /app.json: /** * Module ...
-1
votes
0answers
47 views

Please, review my very small Github repository for potential bad practices? [closed]

http://github.com/viclib/appls It's just a simple tool to convert LiveScript files into HTML5. Yet it depicts many things that I'm not sure I'm doing right, such as: git commits, package.json, the ...
0
votes
2answers
58 views

Is there a better way to read json in node

I have this view that populates an unordered list from values in a json file. I am doing this in node. So is there a better way to do this, or a mode 'node-like' way? Can I load the json file without ...
0
votes
0answers
51 views

Critique my RTCPeerConnection signaling library

I created a library/npm module to handle the signaling process for RTCPeerConnection. There is still a good bit of work that needs done (error handling, dealing with users disconnecting during the ...
3
votes
1answer
92 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
167 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 ...
1
vote
0answers
254 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
60 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
55 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
53 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
1answer
85 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
418 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
122 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 ...
0
votes
0answers
49 views

Uint8Array indexOf method that allows to search for byte sequences

Uint8Array.prototype.indexOfMulti = function(searchElements, fromIndex) { fromIndex = fromIndex || 0; var index = Array.prototype.indexOf.call(this, searchElements[0], fromIndex); ...

1 2 3
15 30 50 per page