Deploy the Application

In notebook:
FrontEndMasters Serverless
Created at:
2017-10-15
Updated:
2017-10-15
Tags:
backend JavaScript libraries React

The $ npm install firebase tools

  1. we need to build our react app
  2. we need to initialise our Firebase database

Initialising the Firebase app

$ firebase init

It will give you a few options. Database/Functions/Hosting We actually need all three.

Next, you connect to one of your firebase project.

?: can specify your own database rules JSON file. (database.rules.json)

?: public folder location (can later change in the JSON file)

?: configure as single-page app : (rewrite all urls to index.html) for client side routing

$ npm run build ☛ builds the clientside app, then we can deploy it ↴

$ firebase deploy to deploy it

Then Firebase gives you an URL and your app is deployed!