node.js sample application.
JavaScript CSS
Switch branches/tags
Nothing to show
Clone or download
donwb Merge pull request #1 from justinmealey/master
Simplified the config system
Latest commit 216c3c2 Feb 17, 2014
Failed to load latest commit information.
config Simplify config to an object Jun 18, 2013
controllers initial commit May 14, 2012
models initial commit May 14, 2012
public/stylesheets initial commit May 14, 2012
views initial commit May 14, 2012
.gitignore initial commit May 14, 2012 formatting error May 14, 2012
app.js Simplify config to an object Jun 18, 2013
package.json initial commit May 14, 2012
routes.js initial commit May 14, 2012


Tableau is a reference app of sorts. It provides our current thinking WRT node.js project layout and structure. Most of the ideas we present here are stolen from various open source projects we've come across.

It's not our intention this project be a 100% solution, rather it covers the starting points. If you are new to Express.js, this should give you an idea how to structure things, as opposed to having a 500 line app.js file (we have plenty of those also).

Much appreciation goes to Christian Sanz and his expressjs-blog example

This example also goes hand in hand with the information documented over on node-info.


Currently Implemented

  • app.js file as a point of startup and configuration, but not routing. link
  • routes living in a dedicated route.js file. link
  • dealing with configuration for multiple environments. link
  • encapsulating controller code into separate, dedicated js files. link
A note about models

We purposely did not implement any models in this example. The answer for 'how do I properly implement my models' is 'it depends'. While this example is biased toward MongoDB, it doesn't choose to specify an ODM. For an example of using the mongo driver, check out HiProfile. For a Mongoose example, take a look at Flow.


  • make the .jade views a bit richer and more relevant.
  • handle session data
  • illustrate dealing with authentication
  • anything else?

We miss something?

I'm sure we did. We would love feedback, or better yet, pull requests.