Skip to content

Instantly share code, notes, and snippets.

@MarkNewcomb1
Created October 3, 2018 19:07
Show Gist options
  • Select an option

  • Save MarkNewcomb1/a6cc25a4f2b4d9fbe863acc91eab48c8 to your computer and use it in GitHub Desktop.

Select an option

Save MarkNewcomb1/a6cc25a4f2b4d9fbe863acc91eab48c8 to your computer and use it in GitHub Desktop.
Deploying angular app to firebase
/ Log into firebase and create a project
// Make sure npm isn’t running anything any place in any terminal
// Change to your angular app folder.
//For me, I did the first dino drill in angular, and so I was in the version-1 folder, and my project folder was named drill1angular. So, from the version-1 folder, I typed `cd drill1angular`
*ng build --prod*
// creates a build folder and merges files into a compact build version.
// Now...cd into your dist/project-folder. Again, I named my project folder drill1angular, and since I was already in version-1/drill1angular, I typed cd dist/drill1angular. _Yes, now there's two project folders named the same thing that are in different places._ Make _sure_ you're in the project folder inside the dist folder. For me, that path was version-1/drill1angular/dist/drill1angular
*firebase init*
// select hosting
// select your project
// *type . as your public directory*
// configure as single page app NO
// overwrite index.html NO
*firebase use --add*
// type your alias - I always just use the same name as the project folder
*firebase deploy*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment