Concerning the folders you mentioned:
/libsis usually used for customclasses/functions/modules/vendoror/supportcontains 3rd party libraries (added as git
sub-module when using git as source control)/speccontains specifications for BDD tests./testscontains the unit-tests for an application (using a testing
framework, see
here)
NOTE: both /vendor and /support are deprecated since NPM introduced a clean package management. It’s recommended to handle all 3rd-party dependencies using NPM and a package.json file
When building a rather large application, I recommend the following additional folders (especially if you are using some kind of MVC- / ORM-Framework like express or mongoose):
/modelscontains all your ORM models (calledSchemasin mongoose)/viewscontains your view-templates (using any templating language supported in express)/publiccontains all static content (images, style-sheets, client-side JavaScript)/assets/imagescontains image files/assets/pdfcontains static pdf files/csscontains style sheets (or compiled output by a css engine)/jscontains client side JavaScript
/controllerscontain all your express routes, separated by module/area of your application (note: when using the bootstrapping functionality of express, this folder is called/routes)
I got used to organize my projects this way and i think it works out pretty well.
Update for CoffeeScript-based Express applications (using connect-assets):
/appcontains your compiled JavaScript/assets/contains all client-side assets that require compilation/assets/jscontains your client-side CoffeeScript files/assets/csscontains all your LESS/Stylus style-sheets
/public/(js|css|img)contains your static files that are not handled by any compilers/srccontains all your server-side specific CoffeeScript files/testcontains all unit testing scripts (implemented using a testing-framework of your choice)/viewscontains all your express views (be it jade, ejs or any other templating engine)