Coder Social home page Coder Social logo

global-localhost / firebase-tools-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from firebase/firebase-tools-ui

0.0 0.0 0.0 1.75 MB

A local-first UI for Firebase Emulator Suite.

Home Page: https://firebase.googleblog.com/2020/05/local-firebase-emulator-ui.html

License: Apache License 2.0

HTML 0.58% CSS 12.27% TypeScript 86.05% JavaScript 1.10%

firebase-tools-ui's Introduction

Firebase Emulator UI

The web UI for Firebase Emulator Suite. Features include:

  • Overview of Emulators running
  • Firebase Realtime Database Data Viewer/Editor
  • Cloud Firestore Data Viewer/Editor
  • Logs Viewer with powerful filters

More on the blog post!

Usage

If you want to use the Emulator UI in your project, just simply follow the guide for installing and running the Emulator Suite.

Make sure you have Firebase CLI >= 8.4.0. (You may want to update if you already have Firebase CLI installed.) The Emulator UI will automatically start when you start the Emulator Suite.

Contributing

We welcome any issues and Pull Requests to improve the Emulator UI. The following instructions cover how to set up your dev environment for iterating on the Emulator UI itself.

(If you're looking forward to use the Emulator UI as a user, please refer to the Usage section above.)

Start the Development Server

To run the development server with test data:

firebase emulators:exec --project sample --only database,firestore --import test-data 'npm start'

This will run the web app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

NOTE: The emulators:exec command is necessary to set the environment variables for the web app to talk to emulators.

Developing within a user project

You can also start the dev server of the Emulator UI and connect to your real project. To do so, first start the Emulator Suite in your project folder:

cd project/
firebase emulators:start --import my-data

โœ”  hub: emulator hub started at http://localhost:4400

This will run the emulators for your project.

In another terminal, run the Emulator Suite UI from the firebase-tools-ui folder: (note that <project-id> must be replaced with the matching project id of your project.)

cd firebase-tools-ui/
GCLOUD_PROJECT=<project-id> FIREBASE_EMULATOR_HUB=localhost:4400 npm start

Open http://localhost:3000 to view it in the browser. Note: The development server runs by default on port 3000, so please make sure you are visiting that URL instead of the production Emulator UI (which defaults on port 4000).

Other Available Scripts

In the project directory, you can run:

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production, both server and web.

The web production build will be output to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.

The server code will be packed into server.bundle.js, which is a standalone JS file including all dependencies, ready for execution with Node.js.

To run the production build with emulators, use:

firebase emulators:exec --project sample --only database,firestore --import test-data 'PORT=3000 node server.bundle.js'

This will start a server that serves both the static files and APIs at http://localhost:3000/.

NOTE: The static files are not meant to be deployed to a website or CDN. They must be used in conjunction with the server as described above.

License

Apache 2.0

firebase-tools-ui's People

Contributors

abeisgoat avatar davideast avatar dependabot[bot] avatar gautamsingal avatar renovate[bot] avatar tjlav5 avatar yuchenshi 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.