Skip to content

griffinsockwell/react-firebase-crud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

screenshot


To Run Locally

$ cd ~/Desktop
$ git clone https://github.com/griffinsockwell/react-firebase-crud.git

Make sure Node.js is installed.

Login to Firebase and create a new app from the dashboard.

Click on 'Add Firebase to your web app'

Change the firebase config in two different files.

  • TaskAppMobile/src/ref.js
  • TaskAppWeb/src/ref.js
const config = {
  apiKey: "<replace-with-your-config>",
  databaseURL: "<replace-with-your-config>",
};

When creating new apps the default security rules require users to be authenticated to be able to read and write to the database. Since this app doesn't require users to be logged in you will need to change your security rules so the app will work.

In the firebase dashboard click on Database and then select RULES and change the rules:

{
  "rules": {
    "tasks": {
      ".read": "true",
      ".write": "true"
    }
  }
}

This will allow anyone to read and write to the tasks path in your database! To learn more about firebase security check the docs here. The security rules for this app can be found in task-app-web/database.rules.json

To run the Web App

Change into the web app directory.

$ cd task-app-web

Install the node modules.

$ npm install

Start the development server.

$ npm start

To run the Mobile App

Change into the mobile app directory.

$ cd task-app-mobile

Install the node modules.

$ npm install

For iOS

$ npm run ios

For Android

$ npm run android

About

A React Firebase Web App with a React Native Mobile App

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published