Mounting the Home Application into Express

Head back to the file where we mount all of the routes in Express:

 function​ mountRoutes (app, config) {
  app.use(​'/'​, config.homeApp.router)
 }

All we do is get the homeApp out of config and then mount its router at the very root. That seems like a good place for a home page.

And that’s it! You’ve set up the home application, and if you start the server—npm run start-dev-server—you can navigate to http://localhost:3000 and just imagine what it would be like watching all these videos that our content creators are going to upload. All the learning!

Get Practical Microservices now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.