I built this application to create a template MVC 'style' app that I could then use as the start point for further development. I used the excellent examples in the main Express github (https://github.com/visionmedia/express) repository, specifically the MVC example, as the starting point. I have however changed it quite substantially to make it clearer and remove some of the 'magic' that confused me at first when learning. If you are familiar with other MVC frameworks hopefully my file structure makes some sense.
NOTE: I've now configured this to work as an npm package, but can't npm publish (still trying to figure out why it won't let me auth). You can follow the commands below, but then run 'npm install' in the root. This will then install it as a library, and give you access to the scripts via the command 'eb' (express bootstrap).
It depends on:
You need to manually install:
- http://nodejs.org/ Node.js: Amazing javascript asynchronous IO library, install manually.
- http://www.mongodb.org MongoDB: NoSQL Database, install manually.
- http://npmjs.org/ NPM: Node package manager, used to install the remaining.
And then install via NPM:
- http://expressjs.com/ Express: Application Framework for Node.js
- http://mongoosejs.com/ Mongoose: Node.JS ORM for Mongo
- http://embeddedjs.com/ ejs: EmbeddedJS Templating
But I've included in this project:
- http://jquery.com/ jQuery: Javascript Library
- http://jqueryui.com/ jQuery UI: UI Library
- http://taitems.tumblr.com/post/482577430/introducing-aristo-a-jquery-ui-theme jQuery Aristo Template: Fantastic looking jQuery UI Template.
TO RUN:
- Install all the dependencies above.
- npm install express-mvc-bootsrap
- Go to a nice clean folder
- Run 'eb create-app'
- Run 'eb'
- browse to http://localhost:3000
OTHER COMMANDS:
- eb script
- eb script generate-all HelloWorld <Wrapper for 3 commands below>
- eb script create-model HelloWorld
- eb script create-controller HelloWorld
- eb script create-views HelloWorld
- eb sever server.port=3000
- eb create-app
TODO:
- Build some amazing apps!