express-intro Flashcards
1
Q
How do you add express to your package dependencies?
A
npm install express
2
Q
What Express application method starts the server and binds it to a network PORT?
A
the listen method of the add object
- Binds and listens for connections on the specified host and port.
when a server is on we say it is “listening”
app.listen(3000, () => {
// eslint-disable-next-line no-console
console.log(‘Express server listening on port 3000’);
});