is now LinkedIn Learning!

To access courses again, please join LinkedIn Learning

All the same content you know and love

Plus personalized recommendations and LinkedIn Career access   

All for the same price as Lynda! Get a 1-month free trial today.

Try LinkedIn Learning for free
Questions? Visit our help center.
Skip navigation

Modularizing our routes

Modularizing our routes: Building a Website with Node.js and Express.js (2016)
Modularizing our routes: Building a Website with Node.js and Express.js (2016)

In a large application, It's not practical to have all your routes in a single file. NodeJS make making modules easy with built in methods that makes it easy to import and output content. The require statement let's you import one document into another one and module.exports allows you to export the contents of a module. Within express, the use method allows our application to use external routes as part of the application. In order for external routes to work, we'll need to a router object provided by the express library to create an instance of a route. This makes the route mountable by our original application.

Resume Transcript Auto-Scroll
Skill Level Intermediate
3h 16m
Show More Show Less
Skills covered in this course
Developer Web Web Development Express.js Node.js

Continue Assessment

You started this assessment previously and didn't complete it. You can pick up where you left off, or start over.

Start My Free Month

Start your free month on LinkedIn Learning, which now features 100% of courses. Develop in-demand skills with access to thousands of expert-led courses on business, tech and creative topics.

Start My Free Month

You are now leaving and will be automatically redirected to LinkedIn Learning to start your free trial.