0
0
Expressframework~20 mins

Nodemon for development reloading in Express - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Nodemon Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
component_behavior
intermediate
2:00remaining
What happens when you run nodemon on an Express app?

You start your Express app using nodemon app.js. What is the main behavior you observe compared to running node app.js?

ANodemon automatically restarts the server when you change any source file.
BNodemon compiles the Express app into a binary before running it.
CNodemon runs the app only once and then exits immediately.
DNodemon disables all console logs to speed up the app.
Attempts:
2 left
💡 Hint

Think about what helps developers see changes without manually restarting.

📝 Syntax
intermediate
1:30remaining
Which command correctly installs nodemon as a development dependency?

You want to add nodemon to your Express project only for development. Which command is correct?

Anpm install nodemon --save-dev
Bnpm install nodemon --global
Cnpm install nodemon --save
Dnpm install nodemon --production
Attempts:
2 left
💡 Hint

Development dependencies are installed with a special flag.

🔧 Debug
advanced
2:00remaining
Why does nodemon not restart after file changes?

You run nodemon app.js but after editing your source files, the server does not restart. What is a likely cause?

ANodemon only works with TypeScript files, not JavaScript.
BNodemon only restarts on changes to <code>package.json</code> by default.
CNodemon requires a manual restart command after every change.
DThe files edited are outside the watched directory or ignored by nodemon.
Attempts:
2 left
💡 Hint

Check which files nodemon watches and ignores.

state_output
advanced
1:30remaining
What is the output when nodemon restarts the server?

You run nodemon app.js and then save changes to app.js. What output do you expect in the terminal?

ANo output; nodemon restarts silently without messages.
BAn error message saying nodemon cannot restart the server.
CA message showing the server stopped and then restarted automatically.
DThe server crashes and nodemon exits immediately.
Attempts:
2 left
💡 Hint

Think about what nodemon shows to inform you about restarts.

🧠 Conceptual
expert
2:30remaining
Why is nodemon preferred during Express app development?

Choose the best explanation for why developers use nodemon instead of running node app.js directly during development.

ANodemon disables all logging to reduce console clutter during development.
BNodemon saves time by automatically restarting the server on code changes, improving developer productivity.
CNodemon runs the app in a sandboxed environment to prevent security issues.
DNodemon compiles Express apps into faster machine code for production use.
Attempts:
2 left
💡 Hint

Focus on how nodemon helps with the development workflow.