Giter VIP home page Giter VIP logo

express-backbone-boilerplate's Introduction

Express Backbone Boilerplate

Build Status

Okay okay, not quite a bare-bones boilerplate, more of a small sample app built using Express and Backbone plus a few friends. I've called it a boilerplate because I've used it as the basis for a few bigger projects, so hope it can help others in this regard too.

Dependencies

Run npm install once you've got a copy of the project.

Client

  • Can be started via grunt start
  • Can be accessed via http://localhost:3000/client/

You can also pass the following commandline args to grunt start:

  • --NODE_ENV: production or development (defaults to development)
  • --NODE_PORT: (defaults to 3000)

e.g. grunt start --NODE_ENV=production --NODE_PORT=4000 will start the server in production mode on port 4000.

The grunt start task will also:

  • Watch the SASS files, and recompile the dev CSS if any changes are made
  • Watch the client src & test JS files, and run JSHint plus the client tests if any changes are made
  • Watch the server src & test JS files, and run JSHint plus the server tests if any changes are made

RequireJS is used for file and module loading. Backbone.js is the client-side MVC framework. Handlebars is used for client-side templating. Compass is used for CSS authoring.

Unit tests

Client

  • Can be run in the browser via http://localhost:3000/client/test/
  • Can also be run headless via grunt test-client
  • JUnit XML is output to ./_junitxml/client

A module listing the required tests to run is generated via grunt. Jasmine is used for testing the JS. CasperJS is used to drive the tests headless via PhantomJS.

Server

  • Can be run via grunt test-server
  • JUnit XML is output to ./_junitxml/server

jasmine-node is used for testing the Node server JS.

Docs

  • Can be generated via grunt docs
  • Output to ./_docs
  • Can be accessed via http://localhost:3000/_docs

Docker is used to generate the client-side docs.

Distribution

  • Can be generated via grunt dist

Uses the RequireJS optimiser to compress the JS. Rewrites the index.html file to only include the one script.

Thanks

express-backbone-boilerplate's People

Contributors

rbywater avatar smozely avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.