-
Notifications
You must be signed in to change notification settings - Fork 2
Installation
Subtlemon edited this page Sep 19, 2019
·
5 revisions
Highly recommend doing all this in an Anaconda environment.
- npm package manager
conda install nodejs
- firebase Realtime Database (not Firestore)
- Python 2.7 (optional, only if you're deploying to GAE)
conda install python
- gcloud (optional, only if you're deploying to GAE)
- cd to client directory.
cd client
- Preflight.
- Install required modules.
npm install
- Add firebase config to
.env
in client directory.
REACT_APP_API_KEY='<your api key>' REACT_APP_AUTH_DOMAIN='<something>.firebaseapp.com' REACT_APP_DATABASE_URL='https://<something>.firebaseio.com' REACT_APP_PROJECT_ID='<something>' REACT_APP_STORAGE_BUCKET='<something>' REACT_APP_MESSAGING_SENDER_ID='<something>'
- Install required modules.
- Run the app (use this for debugging).
npm start
- Build the app (use this for deploying).
npm run build
- cd to firebase directory.
cd firebase
- Install firebase tools.
npm install -g firebase-tools
- Init.
firebase init
- Deploy. If you make changes to cloud functions, you will have to deploy again.
firebase deploy
- cd to client directory.
- (Optional) Change the "homepage" setting in package.json.
- Deploy.
npm run deploy
- View by visiting the "homepage" listed in package.json.
- Preflight.
- Build React Application first.
- Deploy locally.
dev_appserver.py app.yaml
- View by visiting localhost:8080 (default) in any browser.
- Deploy.
gcloud app deploy
- View by visiting http://[YOUR_PROJECT_ID].appspot.com