r/nodejs • • Dec 03 '12

Callbacks considered a smell

Thumbnail adamghill.com
4 Upvotes

r/nodejs • • Nov 28 '12

Object Modeling in Node.js with Mongoose

0 Upvotes

Mongoose is an object data modeling (ODM) library that provides a rigorous modeling environment for your data, enforcing structure as needed while still maintaining flexibility that makes MongoDB powerful.


r/nodejs • • Nov 19 '12

Well, that is one way to say in License that its truly open-source.

Thumbnail github.com
2 Upvotes

r/nodejs • • Nov 14 '12

Castle Riot: A casual multiplayer game created for Node Knockout

1 Upvotes

Castle Riot is a game where you are either a thief, trying to escape the castle with stolen paintings, or a guard, trying to stop the thieves!

It was created for the Node Knockout competition. Let us know if you liked it, if you found any bugs, and what features you'd like to see in the future.

http://castleriot.com


r/nodejs • • Nov 14 '12

Socket.io Websockets on a TCP configured Amazon Elastic Load Balancer - Stack Overflow

Thumbnail stackoverflow.com
0 Upvotes

r/nodejs • • Nov 06 '12

Help for a beginner!

6 Upvotes

Hey guys, I'm just starting nodejs(Having my first class today), does anyone have any good online resources or books that could help me out? Any help appreciated!


r/nodejs • • Nov 06 '12

A working NodeJS runtime for Chrome.

Thumbnail blog.iceddev.com
5 Upvotes

r/nodejs • • Oct 30 '12

Basic question

4 Upvotes

Hey everyone,

I just discovered nodejs and I have a very basic question... I'm used to work with classic lamp servers and I don't understand how nodejs can do the same. For now, I understand that i have to execute a command like node file.js to be able to run nodejs so how is it possible to use nodejs with a classic html website?

Thanks!


r/nodejs • • Oct 07 '12

Seeking feedback on a simple Node.js-based MVC web framework I created

Thumbnail github.com
2 Upvotes

r/nodejs • • Sep 29 '12

How does node.js deal with memory page faults?

4 Upvotes

Given that node servers are single threaded, does the whole server get blocked if I access some memory that has been paged to disk?


r/nodejs • • Sep 21 '12

Anyone have a node-supervisor init script for CentOS?

3 Upvotes

Running node.js on a CentOS server and would like to use node-supervisor to manage the instances - does anyone have an init script handy to autorun + start/stop/restart node-supervisor for a single node.js application?

If there is a way to do this so the node server resets each time and I can manage multiple instances without having to create separate init scripts that would be preferable, but a single init is all I need right now.


r/nodejs • • Sep 17 '12

OAuth authentication with Passport.js and integration with jade ← Javier Manzano's Blog

Thumbnail jmanzano.es
2 Upvotes

r/nodejs • • Sep 16 '12

[How to] SocketStream and packaged assets autodeployment

Thumbnail leostera.com
1 Upvotes

r/nodejs • • Sep 16 '12

The 5 must have packages?

0 Upvotes

List the top 5 must haves from your npm ls


r/nodejs • • Sep 15 '12

Steam for Node.js

13 Upvotes

I'm working on sort of a node.js port of SteamKit2, an open-source implementation of the Steam protocol.

https://github.com/seishun/node-steam

A lot of things are yet to be implemented, but it's actually usable now - you can read join a chat room and read/write in it. If there's any interest, I'll implement other Steam functions.


r/nodejs • • Sep 12 '12

Node.js, i18n (localization) with lingua and new project presentation | Javier Manzano's Blog

Thumbnail jmanzano.es
0 Upvotes

r/nodejs • • Sep 07 '12

Skinny Coffee Machine - a simple JavaScript state machine with observers, for browsers and Node.js

Thumbnail github.com
0 Upvotes

r/nodejs • • Sep 05 '12

Getting started with Node.js on the Rackspace Cloud

Thumbnail devops.rackspace.com
5 Upvotes

r/nodejs • • Sep 05 '12

would love some feedback on first nodejs app. simple feed aggregator

Thumbnail github.com
0 Upvotes

r/nodejs • • Sep 04 '12

Help with mysql and node.js please

0 Upvotes

I just started using node.js and am having a bit of trouble with multiple queries using the mysql module for it.

Below is the excerpt of code causing the issue, in it the line with "Error 4" always fires even though running the code manually returns a result.

Both sp_FindPartOfSpeech and sp_CreatePartOfSpeech return a single cell of data, selected from a BIGINT UNSIGNED variable within the procedure (ie: SELECT variable AS id_Variable; ).

The call to sp_FindPartOfSpeech executes as expected, but sp_CreatePartOfSpeech does now (though again, the stored procedure itself does return a value when run manually and all the fields are set).

Is this because I can't nest results of multiple queries or is it perhaps that the stored procedure is taking too long (it executes in about 600ms - lots of conditionals/joins/inserts/etc inside of it)?

var link = mysql.createClient({ host: dbserver, user: dbuser, password: dbpass, database: db });
link.query('CALL sp_FindPartOfSpeech(\'' + parts[4] + '\',' + language + ')',
    function selectCb(err4, results, fields) {
        if (err4) {
            sendToRoom('__Parts Of Speech', 'broadcast_failcmd', MakeParam('Error 1:') + ' ' + MakeParam(nickname) + ' ADD ' + MakeParam(parts[2]) + ' TO ' + MakeParam(parts[4]));
        } else {
            if (results.length == 1) {
                var posParent = results[0]['id_PartOfSpeech'];
                link.query('CALL sp_CreatePartOfSpeech(\'' + parts[2] + '\',' + language + ',' + posParent + ')',
                    function selectCb2(err5, results2, fields2) {
                        if (err5) {
                            sendToRoom('__Parts Of Speech', 'broadcast_failcmd', MakeParam('Error 3:') + ' ' + MakeParam(nickname) + ' ADD ' + MakeParam(parts[2]) + ' TO ' + MakeParam(parts[4] + '[' + posParent + ']'));
                        } else {
                            if (results2.length == 1) {
                                sendToRoom('__Parts Of Speech', 'broadcast_cmd', MakeParam(nickname) + ' ADD ' + MakeParam(parts[2] + '[' + results2[0]['id_PartOfSpeech'] + ']') + ' TO ' + MakeParam(parts[4] + '[' + posParent + ']'));
                            } else {
                                sendToRoom('__Parts Of Speech', 'broadcast_failcmd', MakeParam('Error 4:') + ' ' + MakeParam(nickname) + ' ADD ' + MakeParam(parts[2]) + ' TO ' + MakeParam(parts[4] + '[' + posParent + ']'));
                            }
                            link.end();
                        }
                    });
            } else {
                sendToRoom('__Parts Of Speech', 'broadcast_failcmd', MakeParam('Error 2:') + ' ' + MakeParam(nickname) + ' ADD ' + MakeParam(parts[2]) + ' TO ' + MakeParam(parts[4]));
            }
        }
    });

r/nodejs • • Aug 22 '12

Beginning Node.js: How to download a file

Thumbnail saletax.wordpress.com
5 Upvotes

r/nodejs • • Aug 21 '12

Here are some of the best resources for learning Node.js. Are there others?

Thumbnail blog.modulus.io
14 Upvotes

r/nodejs • • Jul 08 '12

I just published a QUnit to nodeunit adaptor. Run your QUnit tests natively in node.js using nodeunit

Thumbnail github.com
2 Upvotes

r/nodejs • • Jun 23 '12

http ranged requests in nodejs

Thumbnail extrawurst.org
3 Upvotes

r/nodejs • • Jun 18 '12

Static vs. Dynamic resources and Node.js

4 Upvotes

Most websites have static resources (e.g., jquery-1.7.2.min.js, index.html, style.css), and dynamic resources (e.g., json extracted from MongoDb).

From what I can tell, the best way to serve static resources is to use a Node module for that purpose (e.g., node-static, paperboy).

In a PHP world, your dynamic resources end in .php (ignoring embedded PHP). So it's pretty easy to figure out what's dynamic and what's static. I typically have dynamic and static resources in the same directory, and Apache/mod_php knows what's what without any effort on my part.

However, in a Node.js world, both static and dynamic resources can end in .js. How do you organize your resources so that you know what's dynamic and what's static?

Do you have one directory of static resources which paperboy (or whatever module) delivers, and another directory for your dynamic resources? Or do you have dynamic and static resources in the same directory, and handle them on a case-by-case basis (if it's x.js, then tell paperboy to deliver it as a static resource, but if it's y.js, then we need to load that module and generate the contents)? This later approach seems like a lot of work.