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

🤑 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

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

  • 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
    • Showing results for:
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters
    • Close
  • Mitchell Wintrow
    Mitchell Wintrow
    4,380 Points

    getting 404 error when I use `'/'` instead of `'/cards'` and `'/cards:id'` doesn't work nor does `cards[req.params.id]`

    Posted on Nov 5, 2021 by Mitchell Wintrow
    Mitchell Wintrow
    4,380 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters

    2 Answers

  • William Ray Noble
    William Ray Noble
    22,190 Points

    After watching the video and reading the other questions, still cant resolve 404 error

    Posted on Jul 10, 2020 by William Ray Noble
    William Ray Noble
    22,190 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters

    1 Answer

  • jlampstack
    jlampstack
    23,932 Points

    How can we have the first ID display as 1 instead of 0?

    Posted on Jun 21, 2020 by jlampstack
    jlampstack
    23,932 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters

    2 Answers

  • Viola Chyu
    Viola Chyu
    6,432 Points

    How exactly do you include JSON in Node?

    Posted on May 10, 2020 by Viola Chyu
    Viola Chyu
    6,432 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters

    1 Answer

  • Michael Williams
    PLUS
    Michael Williams
    Courses Plus Student 8,059 Points

    Does the URL parameter always have to be named 'id'?

    Posted on Jan 30, 2019 by Michael Williams
    Michael Williams
    Courses Plus Student 8,059 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters

    2 Answers

  • Ceil-Ian Maralit
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Ceil-Ian Maralit
    Front End Web Development Techdegree Graduate 19,434 Points

    Request object params property

    Posted on Sep 18, 2018 by Ceil-Ian Maralit
    .a{fill-rule:evenodd;}techdegree seal-36
    Ceil-Ian Maralit
    Front End Web Development Techdegree Graduate 19,434 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters

    1 Answer

  • Maria Te
    Maria Te
    8,521 Points

    I have an error when I type localhost:4000/cards:0

    Posted on Aug 1, 2018 by Maria Te
    Maria Te
    8,521 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters

    2 Answers

  • benjaminfarnham
    benjaminfarnham
    8,055 Points

    Not getting 404 error when I use a route with an ID that doesn't exist.

    Posted on Apr 18, 2018 by benjaminfarnham
    benjaminfarnham
    8,055 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters

    2 Answers

  • Sean Flanagan
    Sean Flanagan
    33,236 Points

    Cannot GET /cards

    Posted on Mar 29, 2018 by Sean Flanagan
    Sean Flanagan
    33,236 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters

    4 Answers

  • Brian Patterson
    Brian Patterson
    19,588 Points

    getting this error RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: undefined when going to cards.

    Posted on Mar 10, 2018 by Brian Patterson
    Brian Patterson
    19,588 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters

    2 Answers

  • Leonard Morrison
    PLUS
    Leonard Morrison
    Courses Plus Student 32,914 Points

    I'm getting a 404 on the Cards page

    Posted on Feb 12, 2018 by Leonard Morrison
    Leonard Morrison
    Courses Plus Student 32,914 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters

    1 Answer

  • Kevin Becerra
    Kevin Becerra
    14,243 Points

    Only able to get page to load by using whole route when I should be able to use '/:id'

    Posted on Dec 21, 2017 by Kevin Becerra
    Kevin Becerra
    14,243 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters

    1 Answer

  • Akshit Jindal
    Akshit Jindal
    1,341 Points

    why const { data }=require('./data/flashcardData.json') doesn't work?

    Posted on Dec 10, 2017 by Akshit Jindal
    Akshit Jindal
    1,341 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters

    2 Answers

  • Brian Foley
    Brian Foley
    8,440 Points

    still getting a 404 page

    Posted on Sep 22, 2017 by Brian Foley
    Brian Foley
    8,440 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters

    3 Answers

  • Reid Young
    PLUS
    Reid Young
    Courses Plus Student 14,209 Points

    Now what about a route without an id?

    Posted on Jul 29, 2017 by Reid Young
    Reid Young
    Courses Plus Student 14,209 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Using Data and Route Parameters

    3 Answers

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.