Ensure these ports are not occupied:
- 3000 (frontend)
- 4000 (if use offline backend)
- 9000 (if use offline backend)
Then run these commands in the terminal
# in main directory
npm install
Choose one: Offline or Online. You cannot select both!
firebase emulators:start
Do these steps before starting frontend:
- Ensure its running on port 4000
- Go to localhost:4000/database/is4261/data
- Click ... for more options, then click import JSON
- Browse for JSON file at ./Firebase/is4261-default-rtdb-export.json
- Click import
- End offline database
# do the following and nothing more
- Check and verify firebaseConfig details in ./Firebase/firebaseConfig
- Ensure access to google services (google.com)
- End online database
- Ensure its running in port 3000
- Then go to localhost:3000
# in main directory
npm start
You are done with setup!
# Offline Firebase setup
npm i -g firebase-tools
firebase --version
firebase login
firebase init