npm Scripts and Versions
Scripts in package.json run with npm run name. Version ranges use semver: ^1.2.3 allows minor and patch updates, ~1.2.3 allows patches only. package-lock.json pins exact versions.
Example
{
"scripts": {
"start": "node server.js",
"test": "node --test",
"dev": "node --watch server.js"
},
"dependencies": { "express": "^4.19.0" }
}
// npm run dev
// npm install --save-dev eslintExercise
Run a script.
npm dev
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.