Boilerplate for Firebase-driven batman.js app
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
config
controllers
html/greetings
lib
models
spec
vendor
views/greetings
.gitignore
Gulpfile.js
app.coffee
firebase.json
index.html
package.json
readme.md

readme.md

Batman.js Starter Kit

This kit includes:

Install & Use

  • Install node.js and npm

  • Clone the starter to make my_new_app:

    $ cd ~/code # or wherever
    $ git clone git@github.com:rmosolgo/batman-starter.git my_new_app
    $ cd my_new_app
  • Install everything:

    $ npm install
  • Start the development server:

    $ gulp
  • Open up the landing page: http://localhost:9000

A Closer Look...

Deployment

Deploying with Firebase hosting is so easy that you'll want to cry. When you're signed up for Firebase:

$ npm install -g firebase-tools
$ firebase init
$ firebase deploy
$ firebase open

There's your app!

Specs

I couldn't get Batman.TestCase to play nice with Karma, so I chose Jasmine instead!

  • Specs live in spec/
  • Any global setup (macros, etc) can be put in spec/support/spec_helper.coffee.

Setting up Firebase

  • Sign up for Firebase
  • Make a new project and add the key to @syncsWithFirebase in app.coffee
  • Use @persist BatFire.Storage in your model definitions
  • For the full rundown, see rmosolgo/batfire

Tasks

Task Command
gulp Build the app, start the server, and run tests
gulp build Build the app
gulp test Run the tests
gulp server Start the server

There is one configuration in Gulpfile.js: If you want to preload templates (rather than requesting them as-needed), set PRELOAD_TEMPLATES to true.