Skip to content
Firebase server-less backend for React Social
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
functions
.firebaserc
.gitignore Sync with front-end react social network v0.7.0. May 12, 2019
.runtimeconfig.json
LICENSE
README.md
firebase.json
firestore.indexes.json Sync with front-end react social network v0.7.0. May 12, 2019
firestore.rules
storage.rules Sync with front-end react social network v0.7.0. May 12, 2019

README.md

social-firebase built for react-social-network

🚧 Not Ready yet under construction 🚧

DO NOT USE THIS REPOSITORY

Getting 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

  1. Fork the firestore-social-backend repository on Github
  2. Clone your fork to your local machine
    git clone git@github.com:<yourname>/firestore-social-backend.git
  3. Go to the project root directory
    cd firestore-social-backend
  4. Installing all nodejs modules:
    cd functions && npm install
  5. 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 in default field of projects field.
  6. Set the gmail.email and gmail.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). The recaptcha.secretKey key is using for recaptcha secret key in SMS verification. The phone.sourceNumber, plivo.authId and plivo.authToken are configuration from Plivo SMS Controller 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"
  7. Deploy ;)
 npm start
You can’t perform that action at this time.