Skip to content

AbubakarShf/AmazonClone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How I can run this in my pc?🤔

Simply download this project go inside project directory and open cmd/gitbash. Write npm install and hit enter. It will install all required dependencies.

Now we have to create the database and change configuration of firebase in AmazonClone>src>.firebase>Firebase.js . For that

1.Go on https://firebase.google.com/
2.Create FirStore DataBase.

alt text 3.Give it name products.

4.Specify the collection-type/fields and click on save.

alt text

5. Now, Click on *ProjectDatabase* setting.

alt text

6. Now, Click on higlighted icon *</>*.

alt text

7. Click on config and copy that code.

alt text

8. At the end, paste that code in in replacement of the old code in AmazonClone>src>.firebase>Firebase.js . Carefully!
    apiKey: "AIzaSyCf3H8NCnV4FfEguVVvaKuM2uti7okaPrY",
    authDomain: "clone-ffc29.firebaseapp.com",
    projectId: "clone-ffc29",
    storageBucket: "clone-ffc29.appspot.com",
    messagingSenderId: "530829000076",
    appId: "1:530829000076:web:0fd77c3bbe3e1f7bb2aaa9",
9. Then your file will look like this.
import firebase from "firebase";
const firebaseConfig = firebase.initializeApp({
    apiKey: "AIzaSyCf3H8NCnV4FfEguVVvaKuM2uti7okaPrY",
    authDomain: "clone-ffc29.firebaseapp.com",
    projectId: "clone-ffc29",
    storageBucket: "clone-ffc29.appspot.com",
    messagingSenderId: "530829000076",
    appId: "1:530829000076:web:0fd77c3bbe3e1f7bb2aaa9",
});
const DataBase = firebase.firestore();
export { DataBase };
10. Now write npm run in cmd/terminal.