motioneye icon indicating copy to clipboard operation
motioneye copied to clipboard

Development environment / live reload

Open sevimuelli opened this issue 2 years ago • 3 comments

Hi There is not much documentation concerning development of motionEye. What is the best way to run motionEye for development? Some way to have the project open in VS Code and continuously update the changes. Ideally, I could run it inside a container. I saw that inside server.py, when starting the Tornado webserver, there is an argument "debug", which is kinda doing this. But there is no way to set this under normal operation. What is the normal approach the developer here use? Any help is appreciated.

sevimuelli avatar Dec 27 '23 13:12 sevimuelli

Python does not seem to have a native autoreload feature, which would be required here.

I tend to just restart motionEye when testing changes:

systemctl restart motioneye

MichaIng avatar Dec 27 '23 14:12 MichaIng

I tend to use the following manual "reload" cycle (simplified version here, as if not using Python venv): Rebuild: rm -r build/ motioneye.egg-info/; python3 -m pip install . Start: ~/.local/bin/meyectl startserver -c path/to/my/development/config Terminate server and repeat after changes to code.

zagrim avatar Feb 03 '24 09:02 zagrim