Boilerplate code for a React app using Firebase services and Material UI, with email account user login already set up.
Setup
-
Setup a Firebase project: https://console.firebase.google.com/
-
Make sure you have the Firebase CLI installed: https://firebase.google.com/docs/cli
-
Update
src/firebase.js
with your project's information:
firebase.initializeApp ({
apiKey: "<your api key here>",
authDomain: "<your auth domain here>",
databaseURL: "<your database url here>",
projectId: "<your project id here>",
storageBucket: "<your storage bucket here>",
messagingSenderId: "<your messaging sender id here>",
appId: "<your app id here>"
});
- Install dependencies
$ npm install
Run the project with each command in a separate terminal window:
$ npm start
$ npm run emulators
Once the React project starts running, it should open http://localhost:3000/ in your browser automatically.
When you're ready to build for production:
$ npm run build