react-social-network
firestore-social-backend built forGetting Started
I recommend read firbase instruction first, then continue installation.
Prerequisites
Install NodeJs
Note
- If you're using Windows you should install all node-gyp dependencies with following commands:
$ npm install --global --production windows-build-tools
and then install the package
$ npm install --global node-gyp
Installing
Install back-end server/serverless
- Fork the firestore-social-backend repository on Github
- Clone your fork to your local machine
git clone git@github.com:<yourname>/firestore-social-backend.git
- Go to the project root directory
cd firestore-social-backend
- Installing all nodejs modules:
cd functions && npm install
- Configure firebase:
- In command line of [react-social-network] root project, type firebase login. This command connects your local machine to your Firebase account and grants access to your projects. To test that authentication worked, you can run firebase list to see a list of all of your Firebase projects. The list should be the same as the projects listed at Firebase console.
- Be sure the name of firebase project for [react-social-network] and this project is same. You also need to check
.firebaserc
if you set correct project name indefault
field ofprojects
field.
- Set the
gmail.email
andgmail.password
Google Cloud environment variables to match the email and password of the Gmail account used to send emails (or the app password if your account has 2-step verification enabled). Therecaptcha.secretKey
key is using for recaptcha secret key in SMS verification. Thephone.sourceNumber
,plivo.authId
andplivo.authToken
are configuration from Plivo SMS Service in SMS verification .For this use:firebase functions:config:set gmail.email="myusername@gmail.com" gmail.password="secretpassword" recaptcha.secretkey="secretKey" phone.sourcenumber="sourceNumber" plivo.authid="authId" plivo.authtoken="authToken" setting.appname="App Name"
- Deploy ;)
npm start