NaomiCreate / cnss-app

0 stars 0 forks source link

Deploying site #27

Open mavishak opened 3 years ago

mavishak commented 3 years ago

steps taken to deploy the site

$ npm install -g firebase-tools $ firebase login //check that you are in the correct account [$ firebase use --add //choose project ID, when asked about alias we wrote production] $ firebase init //We choose hosting public directory - we choose dist/name-of-app configure single page app - yes overwrite index.html - yes $ ng build --prod $ firebase deploy **For some reason the last command worked only after changing firebase.json:

  "rewrites": [
      {
        "source": "**",
        "destination": "index.html"
      }

But after that when we wanted to deploy an update we had to change it back to:

  "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }

very strange - we don't have an answer to why this happened, it might just be a coincidence of timing.

In order to deploy updates: $ ng build --prod $ firebase deploy and refresh the page

The site URL is: https://project-cnss.web.app/login