🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • David Rosero
    David Rosero
    11,407 Points

    While creating the cards.js file, it just gave me the error 404. It didn't manage to load the render the cards page.

    Posted September 28, 2023 2:35pm by David Rosero
    David Rosero
    11,407 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    1 Answer

  • Juan Herrera
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Juan Herrera
    Full Stack JavaScript Techdegree Student 13,649 Points

    I got an error, Error: Cannot find module './routes' after running nodemon

    Posted August 25, 2022 12:16am by Juan Herrera
    .a{fill-rule:evenodd;}techdegree
    Juan Herrera
    Full Stack JavaScript Techdegree Student 13,649 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    2 Answers

  • Mitchell Wintrow
    Mitchell Wintrow
    4,380 Points

    Invalid status code. What is that and why doesn't it work?

    Posted November 4, 2021 8:32pm by Mitchell Wintrow
    Mitchell Wintrow
    4,380 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    1 Answer

  • Carlos Chavez
    Carlos Chavez
    5,691 Points

    In the Cards.js file, why leave out the /cards when setting the route?

    Posted July 30, 2020 1:54pm by Carlos Chavez
    Carlos Chavez
    5,691 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    2 Answers

  • Kaleshe Alleyne-Vassel
    Kaleshe Alleyne-Vassel
    8,466 Points

    Why is it better to use the Express 'Router' instead of your own?

    Posted May 14, 2020 2:38pm by Kaleshe Alleyne-Vassel
    Kaleshe Alleyne-Vassel
    8,466 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    0 Answers

  • Jonathan Grieve
    MOD
    Jonathan Grieve
    Treehouse Moderator 91,254 Points

    'Register' route in Express.js not working

    Posted February 7, 2020 3:33pm by Jonathan Grieve
    Jonathan Grieve
    Treehouse Moderator 91,254 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    1 Answer

  • Henrique Hemerly
    Henrique Hemerly
    8,587 Points

    After adding the json data the question and hint are not loading in /cards

    Posted January 4, 2020 7:42pm by Henrique Hemerly
    Henrique Hemerly
    8,587 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    0 Answers

  • vamosrope14
    vamosrope14
    14,932 Points

    Why didn't we declare a path for main route?

    Posted August 8, 2019 1:54am by vamosrope14
    vamosrope14
    14,932 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    2 Answers

  • Michael Pashkov
    Michael Pashkov
    22,024 Points

    What for we need different routes?

    Posted October 26, 2018 7:50pm by Michael Pashkov
    Michael Pashkov
    22,024 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    1 Answer

  • Michael Pashkov
    Michael Pashkov
    22,024 Points

    Why is dot in front of ('./routes')?

    Posted October 26, 2018 6:41pm by Michael Pashkov
    Michael Pashkov
    22,024 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    2 Answers

  • Saud Tauqeer
    PLUS
    Saud Tauqeer
    Courses Plus Student 8,099 Points

    app.use

    Posted August 28, 2018 8:18pm by Saud Tauqeer
    Saud Tauqeer
    Courses Plus Student 8,099 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    1 Answer

  • Shehan Dissanayake
    Shehan Dissanayake
    19,119 Points

    app.use(routes);

    Posted June 6, 2018 5:05am by Shehan Dissanayake
    Shehan Dissanayake
    19,119 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    1 Answer

  • Taylor Facen
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Taylor Facen
    Full Stack JavaScript Techdegree Student 15,441 Points

    TypeError: app.use() requires middleware functions

    Posted December 19, 2017 1:25am by Taylor Facen
    .a{fill-rule:evenodd;}techdegree
    Taylor Facen
    Full Stack JavaScript Techdegree Student 15,441 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    2 Answers

  • jbiscornet
    jbiscornet
    22,547 Points

    My /cards page is not working. All other pages working properly.

    Posted October 3, 2017 7:29pm by jbiscornet
    jbiscornet
    22,547 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    10 Answers

  • Neil Ganotisi
    Neil Ganotisi
    20,975 Points

    What specifically happens when the module.exports line gets used?

    Posted October 3, 2017 4:21am by Neil Ganotisi
    Neil Ganotisi
    20,975 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    1 Answer

  • Peter Lu
    Peter Lu
    10,612 Points

    Why can you do require('./routes/cards') and not require('./routes/cards.js')?

    Posted September 15, 2017 10:30pm by Peter Lu
    Peter Lu
    10,612 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    1 Answer

  • Peter Lu
    Peter Lu
    10,612 Points

    Why only the app.get and app.post methods put into the routes folder?

    Posted September 15, 2017 10:23pm by Peter Lu
    Peter Lu
    10,612 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    2 Answers

  • fggggggggg
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    fggggggggg
    Python Web Development Techdegree Student 5,219 Points

    I have problem when declaring router: debug('dispatching %s %s', req.method, req.url);

    Posted July 23, 2017 8:39am by fggggggggg
    .a{fill-rule:evenodd;}techdegree
    fggggggggg
    Python Web Development Techdegree Student 5,219 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Modular Routes

    1 Answer

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.