Top "Express" questions

Express is a minimal and flexible Node.

First Heroku deploy failed `error code=H10`

I deployed my app to Heroku. It's a node.js + express + socket.io app and this is the package.json …

node.js heroku express
Difference between res.send and res.json in Express.js

What is actual difference between res.send and res.json as both seems to perform same operation of responding to …

javascript node.js http express
nodejs send html file to client

I use this function to send html file to client, but in client I get nothing (blank page) without error. …

node.js express html-rendering
What are express.json() and express.urlencoded()?

I cannot find any documentation on express.json() and express.urlencoded(). What do each of them do exactly?

javascript node.js express
Passing variables to the next middleware using next() in Express.js

Well, my question is I want to pass some variable from the first middleware to another middleware, and I tried …

javascript node.js express middleware next
Uploading images using Node.js, Express, and Mongoose

Please consider newer answers that have more up-to-date information as things have changed over the years! Since many new Node.…

node.js image file-upload express mongoose
How to get all registered routes in Express?

I have a web application built using Node.js and Express. Now I would like to list all registered routes …

node.js express
How to access a preexisting collection with Mongoose?

I have a large collection of 300 question objects in a database test. I can interact with this collection easily through …

mongodb node.js express mongoose
How do I setup a SSL certificate for an express.js server?

Before, in an older version of express, I could do this: express.createServer({key:'keyFile', cert:'certFile'}); However, in newer …

node.js express ssl-certificate
Understanding passport serialize deserialize

How would you explain the workflow of Passport's serialize and deserialize methods to a layman. Where does user.id go …

node.js authentication express serialization passport.js