0.1.0 • Published 9 years ago

riiidbot-brain v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

riiidbot-brain

A tiny firebase brain for riidbot.

Install

npm install riiidbot-brain

Usage

FIREBASE_SECRET, FIREBASE_URL should be on environemnt variable.

B = require 'riiidbot-brain'

# firebase root ref can be accessed via B.root
root   = B.root
keyRef = root.child 'key'

# callback will be called when authentication complete successfully
B.root.onAuth (auth) ->
  return unless auth
  # fetch data or other initialization process