Application template for a structured Node.js, Express, Mongoose, EJS & JQuery Application
How to get started ...
Simple tutorial to get up and running with the Express-mvc-bootstrap. Tested on Ubuntu 10.10 and 10.04.
For this to work, you need a few things already setup and good to go:
- MongoDB: NoSQL Database, install manually.
- Linux : not really sure about Windows ;)
- A working knowledge of Node : This bootstrapper accelerates building a simple app by taking away much of the effort of writing the basic files that drive the application, but it is important if you are going to write anything complex that you understand what is under the hood. Grab the code from Github, take a look, let me know if it can be improved!
Installing Node 0.4.2
Ensure that you are logged in as the user you want to run node as (e.g. a good idea to create a www-data or node user if you are on a server and want to keep it separate from other processes.)
Instructions copied from (https://github.com/joyent/node/wiki/Installation).
tar -zxvf node-v0.4.2.tar.gz
export JOBS=2 # optional, sets number of parallel commands.
You should now be able to type:
cliftonc@localhost:/var/www/node-v0.4.2$ node --version
You can install NPM using the following commands:
curl http://npmjs.org/install.sh | sh
And then check it via:
Installing Everything Else (You may need to run some of these via sudo depending on how your system is configured)
npm install express
npm install mongoose
npm install ejs
npm install express-mvc-bootstrap
Now you should be done!
Creating an app, model, view, controller ...
eb script create-model Group
eb script create-controller Group
eb script create-view Group
Or the fast way:
eb script generate-all Group
You can download this project in either
You can also clone the project with Git
$ git clone git://github.com/cliftonc/express-mvc-bootstrap