GithubHelp home page GithubHelp logo

monicagrandy / express-backbone-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tanem/express-backbone-boilerplate

0.0 0.0 0.0 4.11 MB

:construction: Sample app built using Express and Backbone plus a few friends.

License: MIT License

JavaScript 91.75% HTML 2.47% CSS 5.78%

express-backbone-boilerplate's Introduction

Express Backbone Boilerplate

build status

A small sample app built using Express and Backbone plus a few friends. I've used it as the basis for a few bigger projects, so hope it can help others in this regard too.

Dependencies

Ensure the following are installed:

Install the global dependencies:

$ npm install -g grunt-cli karma istanbul node-inspector bower

Change to your project directory then install the local dependencies:

$ npm install; bower install

Client

To start using default options:

$ grunt start

Can be accessed via http://127.0.0.1:3000/. Node Inspector will also be available via http://0.0.0.0:8080/debug?port=5858.

Once started, the app will also:

  • Watch the server source files, and restart the Node server if any changes are made
  • Watch the SASS files, and recompile the dev CSS if any changes are made
  • Watch the relevant JS files, and run the relevant JSHint tasks if any changes are made

Unit tests

Client

  • Jasmine is used for testing the JS
  • The Jasmine SpecRunner.html is automatically generated via grunt
  • Karma is used to run the tests against various browsers, as well as providing code coverage via Istanbul

Tests can be run in the browser via http://127.0.0.1:3000/test.

To run tests only:

$ grunt client:test

To run tests with coverage:

$ grunt client:cover

Coverage information is output to ./coverage/client.

Server

  • Mocha and expect.js are used for testing the Node server JS
  • Istanbul is used to run the tests and provide code coverage

To run tests only:

$ grunt server:test

To run tests with coverage:

$ grunt server:coverage

Coverage information is output to ./coverage/server.

Docs

  • Docker is used to generate the documentation.

To generate:

$ grunt docs

Can be accessed via http://localhost:3000/docs.

Distribution

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

To generate:

$ grunt dist

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.