Table of Content
Introduction
“Nodemon is a utility depended on about 3 million projects, that will monitor for any changes in your source and automatically restart your server. Perfect for development.
Swap nodemon instead of node to run your code, and now your process will automatically restart when your code changes.” -nodemon.io
Nodemon adalah utility yang sudah digunakan sekitar 3 juta proyek, yang akan memantau setiap perubahan pada code anda secara otomatis memulai ulang server Anda. Proses Anda akan dimulai ulang secara otomatis ketika kode Anda berubah. Untuk menginstal, dapatkan Node.js, lalu dari terminal Anda jalankan:
Install Nodemon
npm install -g nodemonTambahkan kode "start": "nodemon index.js di file package.json
package.json
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "nodemon index.js"
},Untuk run silahkan ketik perintah npm start