Created
December 9, 2011 16:58
-
-
Save alexyoung/1452374 to your computer and use it in GitHub Desktop.
example.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my-project/ | |
Makefile (run tests) | |
index.js (require app.js and start it listening on a port) | |
package.json (include dependencies and devDependencies, package.json isn't just for publishing to npm) | |
lib/ | |
app.js (Set up your Express app, assuming it's Express of course. You could do var User = require('models').User) | |
controllers/ | |
users.js | |
models/ | |
index.js (do exports.User = require('./user'); for each model) | |
user.js (maybe Mongoose schemas or whatever db you're using) | |
views/ | |
users/ | |
node_modules/ | |
(installed modules go here) | |
Note: Mongoose allows you to create your model schemas without being connected to Mongoose first, so don't worry about the fact there isn't a 'connected' Mongoose object instance in the model files. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment