Quay lại Roadmap/Nodejs Roadmap/
Đang tải...
Hướng dẫn thử thách
1 / 113

--watch

### Giai đoạn: Nền Tảng & Khái Niệm Cốt Lõi **--watch** The `--watch` flag in Node.js is a powerful feature introduced in Node.js version 19 that enables automatic reloading of your Node.js application whenever changes are detected in the specified files. Here's How it works: * You run your Node.js script with the `--watch` flag: `$ node --watch your_script.js` * Node.js starts watching the specified file (or directory) for changes. * Whenever a change is detected, Node.js automatically restarts the script ### Khái niệm cốt lõi: 1. **The `--watch` flag in Node** 2. **js is a powerful feature introduced in Node** 3. **js version 19 that enables automatic reloading of your Node** ### Tài liệu tham khảo chính thống: - [Node.js CLI](https://nodejs.org/api/cli.html) (official) - [Node.js --watch Docs](https://nodejs.org/api/cli.html#--watch) (official) - [Medium - Watch Mode](https://medium.com/@khaled.smq/built-in-nodejs-watch-mode-52ffadaec8a8) (article)
Nhiệm vụ của bạn
Viết giải pháp của bạn cho bài học **--watch** vào trình soạn thảo bên cạnh. Bấm **Chạy Thử Nghiệm** (hoặc nhấn `Ctrl+Enter`) để thực thi và ghi nhận hoàn thành kỹ năng trên Roadmap. ### Kỹ năng cần đạt: - `--watch` - `Core` - `Engineering`
Vượt qua bài kiểm tra hiện tại để mở khóa bài tiếp theo.
main.sh
UTF-8 • Tab Size: 2Kiểm tra bài:⌘↵
Test Output
Thử thách này không có bài test tự động. Hãy quan sát kết quả trực tiếp ở khung Preview.