Practice - Step 4 – Create server.js
Practice Questions
Test your understanding with targeted questions
What command is used to import the Express library?
💡 Hint: Think about how we usually bring libraries into our files.
What does app.listen() do?
💡 Hint: Consider what needs to happen for our server to accept requests.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What is the purpose of creating the server.js file?
💡 Hint: Think about how you would start a new application.
What does app.get() do in Express?
💡 Hint: Consider what happens when you visit a website.
1 more question available
Challenge Problems
Push your limits with advanced challenges
Build a new route in your server.js that accepts a name as a parameter and responds with 'Goodbye, [name]!' when someone visits '/farewell/[name]'.
💡 Hint: Think about how you set up the greet route.
Modify your existing routes to include middleware that logs each incoming request to the console.
💡 Hint: Middleware runs before the main request handlers.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.