Git Product home page Git Product logo

firebase-admin-proxyable's Introduction

Firebase Admin Node.js SDK

Install

npm install firebase-admin-proxy --save

Extends Options

const caw = require("caw");
const https = require("https");

// Your Proxy
const firebaseAgent = caw("http://127.0.0.1:8118", {
  protocol: "https",
});

admin.initializeApp({
  credential: admin.credential.cert(serviceAccount),
  databaseURL: "https://YOURAPP.firebaseio.com",
  agent: firebaseAgent, // proxy agent
  logging_enabled: true, // open logging info
});

If logging_enabled is open, your console will print out a similar log:

p:0: Browser went online.
p:0: Listen called for /users default
p:0: Making a connection attempt
p:0: Auth token refreshed
getToken() completed. Creating connection.
c:0:0: Connection created
c:0:0:0 Websocket connecting to wss://YOURAPP.firebaseio.com/.ws?v=5
c:0:0:0 Websocket connected.
c:0:0: Reset packet received.  New host: XXXXX.firebaseio.com
c:0:0: Shutting down all connections
c:0:0:0 WebSocket is being closed
c:0:0:0 Websocket connection was disconnected.
c:0:0:1 Websocket connecting to wss://XXXXX.firebaseio.com/.ws?v=5&ns=YOURAPP
c:0:0:1 Websocket connected.
c:0:0: Realtime connection established.
p:0: connection ready

Find YOURAPP.firebaseio.com and XXXXX.firebaseio.com real ID and add them to the hosts file.

Table of Contents

Overview

Firebase provides the tools and infrastructure you need to develop your app, grow your user base, and earn money. The Firebase Admin Node.js SDK provides admin (second-party) access to several Firebase services.

For more information, visit the Firebase Admin SDK setup guide.

Installation

The Firebase Admin Node.js SDK is available on npm as firebase-admin:

$ npm install --save firebase-admin

To use the module in your application, require it from any JavaScript file:

var admin = require("firebase-admin");

If you are using ES2015, you can import the module instead:

import * as admin from "firebase-admin";

Documentation

Release Notes

Release Notes for the Firebase Admin Node.js SDK are available here.

Acknowledgments

Thanks to the team at Casetext for transferring ownership of the firebase-admin npm module over to the Firebase team and for their longtime use and support of the Firebase platform.

License

The Firebase Admin Node.js SDK is covered by the Terms of Service for Firebase Services.

firebase-admin-proxyable's People

Contributors

gaubee avatar

Watchers

James Cloos avatar Micah Bolen 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.