Skip to content

Commit f3ca05c

Browse files
committedAug 10, 2020
Firebase Setup + Updated ReadMe
1 parent 87a64c0 commit f3ca05c

File tree

3 files changed

+34
-59
lines changed

3 files changed

+34
-59
lines changed
 

‎.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
1+
# firebase config
2+
/src/firebase/config.js
23

34
# dependencies
45
/node_modules

‎README.md

+26-58
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,36 @@
1-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
1+
# Pizza Man Project
22

3-
## Available Scripts
3+
This is an E-Commerce website for ordering Pizza Online
44

5-
In the project directory, you can run:
5+
### Libraries used
66

7-
### `npm run start`
7+
React: To create the Single Page App
8+
Redux: For State Management
9+
Firebase: As a DataBase
810

9-
Runs the app in the development mode.<br />
10-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
11+
### Firebase Setup
1112

12-
The page will reload if you make edits.<br />
13-
You will also see any lint errors in the console.
13+
You need to create a firebase configeration file holding the firebase settings in the path `/src/firebase/config.js`. The required format is:
1414

15-
### `npm run test`
15+
```javascript
16+
const firebaseConfig = {
17+
apiKey: "API-KEY",
18+
authDomain: "AUTH-DOMAIN.firebaseapp.com",
19+
databaseURL: "DATABASE-URL.firebaseio.com",
20+
projectId: "PROJECT-ID",
21+
storageBucket: "STORAGE-BUCKET.appspot.com",
22+
messagingSenderId: "MESSAGING-SENDER-ID",
23+
appId: "APP-ID",
24+
measurementId: "MEASUREMENT-ID",
25+
};
1626

17-
Launches the test runner in the interactive watch mode.<br />
18-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
27+
export default firebaseConfig;
28+
```
1929

20-
### `npm run build`
30+
### How to Use
2131

22-
Builds the app for production to the `build` folder.<br />
23-
It correctly bundles React in production mode and optimizes the build for the best performance.
32+
To use the project follow the steps given below:
2433

25-
The build is minified and the filenames include the hashes.<br />
26-
Your app is ready to be deployed!
27-
28-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
29-
30-
### `npm run eject`
31-
32-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
33-
34-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
35-
36-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
37-
38-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
39-
40-
## Learn More
41-
42-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
43-
44-
To learn React, check out the [React documentation](https://reactjs.org/).
45-
46-
### Code Splitting
47-
48-
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
49-
50-
### Analyzing the Bundle Size
51-
52-
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
53-
54-
### Making a Progressive Web App
55-
56-
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
57-
58-
### Advanced Configuration
59-
60-
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
61-
62-
### Deployment
63-
64-
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
65-
66-
### `npm run build` fails to minify
67-
68-
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
34+
1. Install the necessary modules (`npm install`). If there is any issues, delete `package-lock.json` and try again.
35+
2. Setup Firebase Project and configeration
36+
3. Use `npm start` to run the react app

‎src/firebase/firebase.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import firebase from 'firebase'
2+
import firebaseConfig from './config'
3+
4+
firebase.initializeApp(firebaseConfig)
5+
6+
export default firebase

0 commit comments

Comments
 (0)
Please sign in to comment.