A full-stack NodeJS web application template built with Marionette, Browserify, Gulp, Mongoose, Express, and Mocha.
- Install Nodejs.
- Clone the source from
https://github.com/akenn/webapp-template
- Install dependencies:
npm install
- Build it:
npm run build
- Test everything:
npm test
- Start the webserver:
npm start
After you've built the app and played around with it, you'll probably notice there are a few things you can do. You can create a new account, login, add some notes, delete notes, and logout.
Now it's time to take a look under the hood.
First checkout app/javascripts/main.js
. Notice this section of code:
// Include modules
Application.module('home', require('./modules/home'));
Application.module('login', require('./modules/login'));
Application.module('register', require('./modules/register'));
Every section of the app is broken up into modules (found in app/javascripts/modules
). The application (app/javascripts/application/application.js
) defines how these modules interact with eachother, the application, and application data (user data, preferences, etc).
If you want to remove a module, simply remove it from main.js
and re-build.