How to auto-restart bottle server when Python file changes using nodemon

Assuming you have a Python script that you want to auto-reload every time the file changes, use the following script using nodemon:

nodemon -w . --exec python

The -w . tells  nodemon files to watch for changes of all files in the current directory (.)

I generally recommend creating a script to automatically run this command:

nodemon -w . --exec python

and then make it executable using

chmod a+x

Now you can run it using