Skip to content

Latest commit

 

History

History
36 lines (35 loc) · 1.3 KB

deploy.md

File metadata and controls

36 lines (35 loc) · 1.3 KB

Deploy to Firebase

  1. Setup Environment for the Firebase deployment
    • Install Firebase CLI: npm i -g firebase-tools or yarn global add firebase-tools
  2. Create Firebase account and login into Firebase CLI: firebase login
  3. Open Terminal/CMD/Powershell in your dir.
  4. Now type firebase login command in your Terminal/CMD/Powershell.
  5. Type firebase init.
  6. Select the project by using the arrow keys.
  7. Then Select the Firebase Hosting by using Spacebar and arrow key.
  8. Click No for Single page web app.
  9. Type dist.
  10. Some by default file will be created successfully.
  11. Run locally
    • firebase serve or npm run serve or yarn serve
  12. Update Firebase.json file
        {
            "hosting": {
                "public": "dist",
                "rewrites": [ {
                    "source": "**",
                    "destination": "/index.html"
                } ],
                "ignore": [
                    "firebase.json",
                    "**/.*",
                    "**/node_modules/**"
                ]
            }
        }
  13. Build and deploy
    • firebase deploy or npm run deploy or yarn deploy
  14. The URL to your live site is listed in the output.
  15. Enjoy