From the course: Angular: Creating and Hosting a Full-Stack Site
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Build and serve an Angular app
From the course: Angular: Creating and Hosting a Full-Stack Site
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.