3 ms·
Ask N: node.js best practices?
I'm an experienced Rails programmer looking at a potential future client project in Node.js.
I've played around with node.js a little, using node.js at a very low level (no frameworks, less than 100 LOC).
Obviously, that style of development won't work on a real project.
Node.js seems to mostly "pick your components and go". (With the exception of maybe Railroad.js). Pick your components is OK with me (I've been doing web work since before Rails got popular, so I'm used to this style).
But I also want to make sure my best practices from the Rails world stay with me. Database migrations and testing are a few of the areas where Rails has a clearly defined best practice, but things seem murkier on the node.js side.
Also thinking coffeescript, to reduce boilerplate.
So, node.js hackers of HN: What are your best practices? For example, what auto-reloading tool do you use? Testing framework? ORM? (or no ORM?), view/template system?
Any other advice for a programmer whose been around the block a number of times (C++, Python, Cocoa, Ruby) and wants to start a new node.js project off right?
(Book recommendations are also great. I looked at the current crop of books, but I almost want a Rails Recipes or Python Cookbook style of book for node, but don't see one)
- jalanco 15y agoI would recommend that you ask this question on the nodejs Google group to get a better response (https://groups.google.com/forum/#!forum/nodejs https://groups.google.com/forum/#!forum/nodejs) or Stack Overflow. Update: Also, the good folks at nodejitsu have compiled a great resource at http://docs.nodejitsu.com/ http://docs.nodejitsu.com/ And more links: http://www.readwriteweb.com/hack/2011/04/6-free-e-books-on-nodejs.php http://www.readwriteweb.com/hack/2011/04/6-free-e-books-on-n... http://howtonode.org/ http://howtonode.org/ http://nodebeginner.org/index.html http://nodebeginner.org/index.html http://www.manning.com/cantelon/ http://www.manning.com/cantelon/ (node.js in action meap) http://stackoverflow.com/questions/2353818/how-do-i-get-started-with-nodejs http://stackoverflow.com/questions/2353818/how-do-i-get-star...