Skip to content

justinhelmer/backbone-node-boilerplate

Repository files navigation

backbone-node-boilerplate

Backbone framework with node server

WARNING

This project is not currently being maintainted

Getting Started

  1. Run setup script:
$> chmod +x setup.sh && ./setup.sh

This will install the necessary requirements on your system. However, note that with this method, you will have to build as a separate step.

  1. Set up environment variables
$> source .profile

tip: add this line to your .bash_profile to automatically set up your shell environment

  1. Build & launch the web app
$> grunt --browser

tip: run any grunt task with the --browser flag to open the web app in a browser window

Building the web app

The system uses Grunt to handle various repetitive tasks.

The default grunt task is:

$> grunt

This will run grunt build:dev, where dev is the build mode build modes.

The two build modes, dev and dist, can be differentiated as followed:

  • dev is faster, and will automatically launch a local web server and node server to make API requests. It also launches additional dev tools (see below).
$> grunt build:dev
  • dist provides further compression options to minimize the final payload for production builds.
$> grunt build:dist

Launching the web app

The build:dev grunt task additionally triggers concurrent:dev, which launches a local node server on port 9001 (by default), and a LiveReload server on port 35729 (by default).

While the node server is running, open a web browser and visit http://127.0.0.1:9001 to view the web app.

Additionally, concurrent:dev triggers watch:dev, which listens for changes to development files, and will re-build application files and re-launch the local Node & LiveReload servers automatically. If you have LiveReload installed and running on your system, then the browser will automatically refresh to show the changes on each save.

Standards

  • Karma for Behavior-Driven Development, built on top of
  • Jasmine as the BDD framework & expectation library
  • JSHint with the following options:
options: {
  camelcase: true,
  curly: true,
  eqeqeq: true,
  indent: 2,
  newcap: true,
  quotmark: 'single',
  strict: true
},

*NOTE that with strict: true, all custom javascript must adhere to EMCAScript 5's Strict mode.

Technologies

About

Backbone-based web client paired with a Node-based web server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published