Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7637055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:50:42+00:00 2026-05-31T07:50:42+00:00

Hi Everyone I am newbie to Express + NodeJS. I come from Java and

  • 0

Hi Everyone I am newbie to Express + NodeJS. I come from Java and trying to get caught up on Node now so please be gentle if I ask some basic questions (I have spent the last 2 days catching up on this stuff)

My questions are around documentation.

So when I look through some of the examples present on Express site I see the following

app.get('/users/:id?', function(req, res, next){
 ......
});

and sometimes

app.get('/users/:id?', function(req, res){
 ......
});

where is the documentation for me to determine how many paramaters go into the function?? first theres was req, res and next but then it had req and res.

Second question: where is the documentation for what is available on the request and response objects along with other method that are available as part of the framework?

I looked up the documenation here http://expressjs.com/guide.html#req.header() but I can’t imagine this is entire doc because i notice methods being used on examples that are not present on this documentation.

Can someone point me to the most commonly used docs for express + nodeJS development? If you can list all the links here I would be very grateful!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T07:50:43+00:00Added an answer on May 31, 2026 at 7:50 am

    First question: You need to slow down a minute. Do you have any experience with another language besides Java? Javascript does not have method signatures in the way you know from Java. Here is a quick example:

    function foo(bar, baz, qux) {
        var result = bar + baz;
        if(qux) {
            result += qux;
        }
        return result;
    }
    
    foo(1, 2);
    // => 3
    foo(1, 2, 3);
    // => 6
    

    It’s a contrived example, but it shows that you can declare a function which takes 3 arguments, and only use two of them. In fact, it could use arguments directly and accept even more arguments than specified in the function declaration!

    function bar(foo) {
        if(arguments.length > 1) {
            var baz = arguments[1];
            return foo + baz;
        }
        return foo;
    }
    
    bar(2);
    // => 2
    bar(2, 4);
    // => 6
    

    Anyway, in short, your route handler function(req, res, next) {} will always be called with req, res, and next — but it just might be the case that you don’t need next (because you won’t ever pass on control, perhaps), so you omit it (it will still be there, in your arguments object, just not scoped as next). Some feel this is sloppy, others that it’s succinct.

    Second question: Here is node.js docs, http.ServerRequest, http.ServerResponse. You already know the Express guide.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Java newbie. I am trying to run a java main class from cmd line
everyone. I'm trying to get data from some page, it's updated using javascript. First,
Everyone, I am a newbie to android development. Now I have a question that
G'day everyone I'm a newbie to C++ and even more so to Borland Turbo
Hi there everyone im a newbie so can anyone of u help me solve
Hey everyone I am a newbie and would love some help. I got the
Hey everyone I've looked for hours trying to find a solution to this, my
Greetings Everyone Being a newbie to javascript attacks and all other sort of attack
Hi everyone (first post!). I'm a JQuery and Javascript newbie. I'm working on the
Hey everyone, I'm a newbie and I have what I anticipate will be a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.