![]() ![]() On the other hand, JSON files are also monitored because they are often used to store metadata for Node.js projects. This is because Node.js projects can work with TypeScript and CoffeeScript files that compile into pure JavaScript before being executed. -ext: Nodemon, by default, searches for files with JavaScript, TypeScript, CoffeeScript, and JSON extensions.For example, using nodemon in a TypeScript script: nodemon -exec ts-node You can use the - exec option to get nodemon’s automatic reloading function in such scripts. -exec: Although it’s a JavaScript utility, you can also use Nodemon to watch non-JavaScript files like TypeScript, Python, and Golang.For example, monitoring a server directory: nodemon -watch server To take control of that option, use the - watch option to add specific file paths and change what directory is being watched. -watch: By default, when running, nodemon monitors the current working directory.You may use the switch option like so: nodemon -ignore lib/app.js -ignore: The ignore switch option allows you to ignore specific files in your web server application. ![]() You can select the amount of time that nodemon will wait before restarting. You can specify a different delay with the - delay switch. -delay: When a file changes, nodemon waits for a second by default before restarting the process.To see a list of all the available nodemon options and their functions, run this command: nodemon -help options Nodemon has several command-line options that you can use to modify its behavior. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |