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

  • Home
  • SEARCH
  • 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 9038103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:24:32+00:00 2026-06-16T09:24:32+00:00

I have been reading documents/urls and really not understand about app.use and its usage.

  • 0

I have been reading documents/urls and really not understand about app.use and its usage.
I understand that it is part of connect but I am really not getting that.

Example:

// ignore GET /favicon.ico
app.use(express.favicon());
// add req.session cookie support
app.use(express.cookieSession());
// do something with the session
app.use(count);

can you please explain me all these 3 . what they mean?
does this mean based on (1) that
app.use is noting but => app.get?
app.use(count) what and when is this count be executed (or) called/

Looks Basic but did not get the answers

// ignore GET /favicon.ico
app.use(express.favicon());

// pass a secret to cookieParser() for signed cookies 
app.use(express.cookieParser('manny is cool'));

// add req.session cookie support
app.use(express.cookieSession());

// do something with the session
app.use(count);

// custom middleware
function count(req, res) {
  • 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-06-16T09:24:33+00:00Added an answer on June 16, 2026 at 9:24 am

    When you call app.use(), you pass in a function to handle requests. As requests come in, Express goes through all of the functions in order until the request is handled.

    express.favicon is a simple function that returns favicon.ico when it is requested. It’s actually a great example for how to get started with this pattern. You can view the source code by looking at its source: node_modules/express/node_modules/connect/lib/middleware/favicon.js

    express.cookieSession is some more middleware for supporting session data, keyed from the client by a cookie.

    I don’t know what count does… is that your own code? In any case, let me know if this is not clear.

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

Sidebar

Related Questions

I have been reading conflicting information about the use of #define macros in iOS
For years I've been reading about XML and I have just not quite grokked
Have been reading about async and tasks and been attempting to convert the CopyFileEx
I have been reading up on the changes that .NET4.5 will bring, and on
I have been reading about making ajax heavy applications more search engine friendly: https://developers.google.com/webmasters/ajax-crawling/docs/getting-started
I have been reading a lot about QR codes and how the code itself
I have been reading about MVP, MVVM and have used asp.net MVC in couple
I have to write some code to handle reading and validating XML documents that
I have been reading around and know that by default jQuery within a the
I have a web app that needs to be able to convert word documents

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.