Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

node.js boilerplate + best practices [closed]

I'm new to node.js, just starting..

i'm after a good node.js boilerplate and best practices such as coding design pattrens (for example Dependency injection, etc.. I've read JS design pattrens by Douglas Crockford not once.. but would like to see the differences for node) name-spacing - with directory structure, etc..

regarding node.js stack as far as i know:

  • express - must
  • async - must (flow control)
  • dnode - ?
  • socket.io - websocket
  • nowjs - would love to use it , but as i understand the scale version won't be free ("we'll soon be licensing a distributed version of NowJS currently under development. Contact us at [email protected]")
  • underscore + backbone - ?
  • DB layer - ?
  • templating - i use handleBars - jquery is a must
  • require.js - (i don't want to use commonJS... not sure how the integration on the server works)

So what to add/ remove from the libs list?, where can i find a professional boilerplate? and any other tips relating to it.

Thanks in advance!

like image 301
user1271518 Avatar asked Aug 12 '12 14:08

user1271518


1 Answers

IMHO, for a project skeleton, more important than which modules to include (those are easy to install with npm, anyway) is how to structure your project, how to use cluster properly and do hot-reloading for dev + process monitoring in production.

You can see some of those tricks at: http://nodebootstrap.com https://github.com/inadarei/nodebootstrap

Edit: dead link as of 12/03/14

like image 135
irakli Avatar answered Sep 19 '22 19:09

irakli