Effective setup for using express.js, backbone.js, connect-assets


I'm a bit of a node.js newbie and am trying to setup an app that uses Backbone.js for the client-side app but sits atop express.js and node.js so I have the server-side extensibility as well..

However, there aren't many examples online of a clean setup/organization for using these technologies together. How should this project be laid out and is this even the effective mix of technologies that I think it is?

|____app.js
|____assets
| |____css
| |____js
| | |____models
| | |____test.coffee
| | |____views
|____lib
| |____setup.js
|____package.json
|____public
| |____images
| |____javascripts
| |____stylesheets
| | |____style.css
| | |____style.less
|____routes
| |____index.js
| |____user.js
|____views
| |____index.jade
| |____layout.jade 

Moreover, I am hoping to be able to write this entire app, Backbone logic and all, in coffeescript (using connect-assets)...

I've also found that there aren't a lot of good example project templates out there.

express-coffee is a good one I've found that has some really helpful defaults including some of the things you are looking for.

  • connect-assets
  • Coffeescript all the things.
  • mocha unit tests already setup.
  • Great default cake commands.

I've started a fork that includes the Twitter Bootstrap styles and a requireJS and Backbone setup on github but if you're still new to node.js it might be a little intimidating.