Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

js-firebase

Externs for firebase
https://github.com/okawa-h/js-firebase-extern/

To install, run:

haxelib install js-firebase 0.2.0 

See using Haxelib in Haxelib documentation for more information.

README.md

Firebase JavaScript SDK externs for Haxe

This is extern for Haxe. A tool for controlling firebase with Javascript for everyone.

Enviroment

Haxe < 3.4.7

JavaScript Firebase SDK < 6.4.0

Example

This is extern. Load Firebase JavaScript SDK in HTML.

import firebase.Firebase;
import firebase.app.App;

class Main {

  public static function main():Void {

    var config = {
      apiKey: "xxxxxxxxxx",
      authDomain: "xxxxxxxxxx.firebaseapp.com",
      databaseURL: "https://xxxxxxxxxx.firebaseio.com",
      projectId: "xxxxxxxxxx",
      storageBucket: "xxxxxxxxxx.appspot.com",
      messagingSenderId: "xxxxxxxxxx",
      appId: "xxxxxxxxxx"
    };

    var app:App = Firebase.initializeApp(config);

  }

}

Generate JavaScript code:

// Generated by Haxe 3.4.7
(function () { "use strict";
var Main = function() { };
Main.main = function() {
  var config = { apiKey : "xxxxxxxxxx", authDomain : "xxxxxxxxxx.firebaseapp.com", databaseURL : "https://xxxxxxxxxx.firebaseio.com", projectId : "xxxxxxxxxx", storageBucket : "xxxxxxxxxx.appspot.com", messagingSenderId : "xxxxxxxxxx", appId : "xxxxxxxxxx"};
  var app = firebase.initializeApp(config);
};
Main.main();
})();

References

Original API document: https://firebase.google.com/docs/reference/js

Contributors
okawa-h
Version
0.2.0
Published
5 years ago
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub