$ npm install -g firebase-tools
$ git clone #repo-url
$ cd admin-panel
$ npm install
| $ yarn install
$ npm start
| $ yarn start
Make sure you use right config for firebase project and right credentioals for signing in to interact with database.
Rename .env.example
to .env
and add your credentials.
You must create user in your firebase app console and use its credentials:
email: REACT_APP_FIREBASE_ADMIN_EMAIL
password: REACT_APP_FIREBASE_ADMIN_PASSWORD
Don't forget to set right access to database in firebae app console:
{
"rules": {
".read": "auth != null",
".write": "auth != null",
}
}
$ firebase use #project-name
https://firebase.google.com/docs/hosting/quickstart
$ npm run build
| $ yarn build
$ npm run deploy
| $ yarn deploy
Note: it will hosted in firebase using this project. You can also get project build (/build folder) and host it everywhere.
Example app https://imp-app-8eb8b.firebaseapp.com/clubs
Database must have shape like this https://imp-app-8eb8b.firebaseio.com/.json