(c) 2012-present Aaron Zampaglione azampagl@azampagl.com
This is a base application that uses Express, Mocha, Soda (Selenium), Docco, RequireJS (+ i18n), jQuery, Bootstrap, Backbone, and Less.
The files are developed in CoffeeScript and then use cake to compile the server side source in real time and CodeKit to compile JavaScript, Stylesheets, and Images to the "/public" folder in real time.
** This is not intended to be a framework. This project is just a clean implementation using all of today's bleeding edge web development technologies and practices. **
- Developed in CoffeeScript.
- Every controller/route is RESTful.
- Internationalization (i18n).
- Themes.
- Built with security in mind.
- CSRF protection (even works with continuous AJAX requests).
- XSS protection (with jade).
- Documentation via Docco.
- Unit testing via Mocha.
- Functional testing via Soda (Selenium).
- Adheres with Yahoo's Performance Rules (e.g. cookie-free-domains, minified images/javascripts/stylesheets, sprites, etc.).
- Bootstrap based.
- Modular front-end and back-end development with RequireJS.
After pulling the master branch, install all the dependencies and go!
npm install -d
Running in production is pretty simple... just run server.js!
node server.js
While developing, turn on cake dev mode to automatically convert your .coffee files in the "/src" directory into .js files in the "/app" folder.
./cake dev
In addition, make sure that CodeKit is activated on your "/public/default" folder (or whatever theme is currently activated). CodeKit will automatically convert CoffeeScript files to minified JavaScript ("/public/{theme}/coffee" => "/public/{theme}/js") and Less files to normal minified stylesheets ("/public/{theme}/less" => "/public/{theme}/css").
The application is setup to execute both unit (+supertest) and functional tests. To simply run all of the tests, run the following command in the root of the application:
./cake test
Before running these tests, don't forget to have selenium running in the background!
To run all functional tests:
./cake testFunctional
To run an individual functional test:
./cake -i index tesFunctional
To run select functional tests:
./cake -i index,i18n tesFunctional
Still under development.
To run all unit tests:
./cake test unit
To run an individual unit test:
./cake test unit routes/foo
To run select unit tests:
./cake test unit routes/foo,routes/i18n