Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Express Basics!
You have completed Express Basics!
Preview
Make the app more maintainable by moving the routes into their own file.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
build out the rest of our
flash card application.
0:00
Before I dig in,
0:01
I just want to show you quickly how to
move your routes into a separate file.
0:02
Knowing how to modularize your app
will keep your code well organized and
0:07
easy to maintain over time.
0:12
This is how most professionals
structure their code.
0:14
So, you'll often see routes in a separate
file in Production Express apps.
0:17
First, I'll create a folder
to hold my routes file.
0:22
I'll call it routes.
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up