Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. Deploying a React App to firebase!!!
  2. NOTE: Before deployment, you will need to first run npm run build to create the build folder which will be used for deployment. You need to have this before starting these firebase commands
  3. 1) Install firebase CLI tools with this command:
  4. npm install -g firebase-tools
  5. 2) In your terminal, run (if its your first time using firebase CLI):
  6. firebase login and enter your credentials
  7. 3) Create a new project in the Firebase Console (website)
  8. 4) In your terminal, run:
  9. firebase init
  10. 5) "Which CLI features do you want to setup for this folder? Press Space to select features, then Enter to confirm your choices"
  11. use arrow keys, select HOSTING option with spacebar. Press ENTER.
  12. 6) "What do you want to use as your public directory? (public)"
  13. build, Press Enter
  14. 7) "Configure as a single-page app (rewrite all urls to /index.html)"
  15. Y, Press ENTER
  16. 8) "File build/index.html already exists. Overwrite?"
  17. N, Press ENTER
  18. 9) Should see success message of "Firebase initialization complete!"
  19. 10) Last command in your termnial:
  20. firebase deploy
  21. If everything worked... it should upload everything and then provide a URL to your project console and the deployed URL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement