sudo apt install -y python3-pip nginx
Nginx
ConfigurationNginx is used to route traffic to the Fastapi server
Editing default configurations that comes with nginx installation
sudo vim /etc/nginx/nginx.conf sudo vim /etc/nginx/sites-enabled/new_file_name
server { listen 80; server_name 0.0.0.0; location / { proxy_pass http://127.0.0.1:8000; } }
# Start nginx sudo service nginx restart # Test nginx sudo nginx -t # View Nginx Error Log sudo nano /var/log/nginx/error.log
Uvicorn is the server runner
pip install uvicorn
uvicorn file_name:app
Make output console scrollable
"your_command" | less