Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Firebaseでラクラクリアルタイムアプリ

pochi
May 13, 2016

 Firebaseでラクラクリアルタイムアプリ

Firebaseの導入とかなんとかかんとか

pochi

May 13, 2016
Tweet

More Decks by pochi

Other Decks in Programming

Transcript

  1. Firebaseのツカイカタ <head> <script src='https://cdn.firebase.com/js/client/2.2.1/firebase.js'></script> </head> <body> <script> var myDataRef =

    new Firebase(‘https://vivid-torch-691.firebaseio.com/'); myDataRef.child(‘foo’).set(‘bar’); myDataRef.on('child_changed', function(snapshot) { var value = snapshot.val(); console.log(value); }); </script> </body> リアルタイムデータベース
  2. Firebaseのツカイカタ $ npm install -g firebase-tools $ firebase login Visit

    this URL on any device to log in: https://www.firebase.com/login/confirm.html?ticket=XXXXX Waiting for authentication... ✔ Success! Logged in as [email protected] $ firebase init ? What Firebase do you want to use? vivid-torch-691 ? What directory should be the public root? public ✔ Public directory public has been created Firebase initialized, configuration written to firebase.json $ firebase deploy ホスティング