I've dusted off my Raspberry Pi (3 B+) and decided to make a home server using FastAPI.
FastAPI requires Uvicorn to run which is a Python module. Running it looks like so
python3 -m uvicorn --host 0.0.0.0 main:app
I would like this to run every time the Pi is powered on, so crontab seemed like the right solution.
using sudo crontab -e, I add the line
@reboot python3 -m uvicorn --host 0.0.0.0 main:app &
Online resources show how to execute a script where you can specify an absolute path, but not how for a module
What am I doing wrong here?