0
0
Expressframework~10 mins

Nodemon for development reloading in Express - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the Express module.

Express
const express = require([1]);
Drag options to blanks, or click blank then click option'
A"nodemon"
B"express"
C"http"
D"fs"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'nodemon' instead of 'express' in require.
Forgetting the quotes around the module name.
2fill in blank
medium

Complete the script command to run the app with nodemon.

Express
"scripts": { "start": "node app.js", "dev": "[1] app.js" }
Drag options to blanks, or click blank then click option'
Anode
Bnpm
Cnodemon
Dexpress
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'node' instead of 'nodemon' for development reload.
Typing 'npm' or 'express' as the command.
3fill in blank
hard

Fix the error in the nodemon config file to watch the correct folder.

Express
{
  "watch": ["[1]"]
}
Drag options to blanks, or click blank then click option'
A"src"
B"node_modules"
C"public"
D"dist"
Attempts:
3 left
💡 Hint
Common Mistakes
Watching 'node_modules' which causes unnecessary reloads.
Watching 'dist' which is usually the build output.
4fill in blank
hard

Fill both blanks to create a nodemon config that restarts on .js and .json changes.

Express
{
  "ext": "[1]",
  "ignore": ["[2]"]
}
Drag options to blanks, or click blank then click option'
Ajs,json
Bnode_modules
Ctxt,md
Ddist
Attempts:
3 left
💡 Hint
Common Mistakes
Including spaces in the extensions list.
Ignoring the wrong folders.
5fill in blank
hard

Fill all three blanks to add a nodemon script, install command, and start command.

Express
{
  "scripts": {
    "[1]": "nodemon app.js",
    "install": "npm install nodemon --save-dev",
    "start": "node app.js"
  }
}
Drag options to blanks, or click blank then click option'
Adev
Bnpm
Cnodemon
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' instead of 'dev' for nodemon script.
Confusing 'nodemon' with 'npm' in scripts.