Application template for a structured Node.js, Express, Mongoose, EJS & JQuery Application
Screenshots
How to get started ...
Simple tutorial to get up and running with the Express-mvc-bootstrap. Tested on Ubuntu 10.10 and 10.04.
Pre-Requisites
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).
cd /var/www
wget http://nodejs.org/dist/node-v0.4.2.tar.gz
tar -zxvf node-v0.4.2.tar.gz
cd node-v-0.4.2
export JOBS=2 # optional, sets number of parallel commands.
mkdir ~/local
./configure --prefix=$HOME/local/node
make
make install
export PATH=$HOME/local/node/bin:$PATH
You should now be able to type:
cliftonc@localhost:/var/www/node-v0.4.2$ node --version
v0.4.2
Installing NPM
You can install NPM using the following commands:
curl http://npmjs.org/install.sh | sh
And then check it via:
npm -version
0.3.15
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
Installing Bootstrap
npm install express-mvc-bootstrap
Now you should be done!
Creating an app, model, view, controller ...
cd /var/www
mkdir myApp
cd myApp
eb create-app
eb script create-model Group
eb script create-controller Group
eb script create-view Group
eb
Or the fast way:
eb script generate-all Group
eb
Authors
cliftonc (clifton.cunningham@gmail.com)
Download
You can download this project in either
zip or
tar formats.
You can also clone the project with Git
by running:
$ git clone git://github.com/cliftonc/express-mvc-bootstrap