Fireship · @fireship

How to Deploy an Angular App to Firebase Hosting

Uploaded April 19, 2017 · Length 1:55

How to Deploy an Angular App to Firebase Hosting

Summary

deploy angular app to firebase hosting in seconds with free low volume usage

  • angular firebase hosting
  • firebase deployment
  • angular deployment
  • static hosting
  • firebase cli

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    in this episode we're going to deploy an

  2. 0:02

    angular 4 app to Firebase hosting after

  3. 0:05

    some initial configuration you can

  4. 0:07

    deploy your app to Firebase in a matter

  5. 0:08

    of seconds the best part is that it's

  6. 0:10

    free for low volume usage and you'll be

  7. 0:12

    prepared to scale up as your app

  8. 0:14

    [Music]

  9. 0:18

    grows running the NG build command will

  10. 0:21

    compile and Minify your code into a

  11. 0:23

    single package located in the disc

  12. 0:25

    folder you could drop the contents of

  13. 0:27

    this directory into virtually any static

  14. 0:30

    hosting platform or even an S3 bucket

  15. 0:33

    and your site would be ready to serve

  16. 0:34

    traffic right

  17. 0:35

    [Music]

  18. 0:37

    away Firebase has a nice command line

  19. 0:39

    package for deployment install it with

  20. 0:42

    npm then log into your Firebase account

  21. 0:44

    from the command

  22. 0:49

    line make sure you're in the top level

  23. 0:51

    directory of your angular app then run

  24. 0:53

    Firebase emit this will take you through

  25. 0:56

    a onetime configuration for your app for

  26. 0:58

    the most part you can stick with the

  27. 1:00

    default settings except in these

  28. 1:02

    following

  29. 1:03

    cases choose hosting on the first

  30. 1:06

    question change the public folder to

  31. 1:09

    dist when asked because that will

  32. 1:11

    default to

  33. 1:12

    public configure as a single page app

  34. 1:15

    answer yes if Firebase asks to overwrite

  35. 1:19

    your index.html file respond with

  36. 1:25

    no now your app should be ready to

  37. 1:27

    deploy run the Firebase deploy command

  38. 1:30

    then check the project URL that it gives

  39. 1:32

    back to you to make sure everything

  40. 1:33

    looks

  41. 1:40

    good that's all for Firebase deployment

  42. 1:42

    see you next

  43. 1:45

    time audio

  44. 1:47

    [Music]

  45. 1:53

    jum