From the course: Angular: Creating and Hosting a Full-Stack Site

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Build and serve an Angular app

Build and serve an Angular app

From the course: Angular: Creating and Hosting a Full-Stack Site

Start my 1-month free trial

Build and serve an Angular app

- [Instructor] So now we've come to the last piece of our full stack hosting puzzle and that's building and serving our front end from Google Cloud. Now, this process has a few steps. The first step here is going to be to build our front end application and to do that, we need to run the command ng build and hit Enter. And what this command does is it compiles our entire Angular application into basic HTML, CSS and JavaScript files that can simply be loaded and executed by the end user's browser. And once this script finishes running, all of this compiled code is put into this dist directory here. So here's how this is going to work. What we're going to do is have our hapi server serve all the files in this dist directory, along with all the API routes that we've created throughout the course. So to do that, the first thing we're going to do is we're going to copy this dist directory and we're going to paste it…

Contents