Test Run the Application¶
Before setting up systemd or Nginx, verify that the application runs correctly.
This ensures that configuration and dependencies are working as expected.
1. Activate Virtual Environment¶
Inside the project directory:
Confirm that (venv) appears in your terminal.
2. Start the Application¶
Run the main application:
3. Verify Application Startup¶
If successful, you should see:
- No import errors
- No missing environment variable errors
- Server binding message (example):
4. Test Locally¶
From the same server:
Or open in browser:
If running correctly, you should receive A Response
5. Common Startup Errors¶
Missing Environment Variables¶
Error example:
Solution:
- Ensure .env file exists
- Verify all required variables are set
Port Already in Use¶
Error example:
Check running processes:
Kill process if necessary:
Module Not Found¶
Error example:
Solution:
6. Stop the Application¶
Press:
The application should stop gracefully.
Important¶
Only proceed to systemd setup after confirming:
- Application runs without errors
- Port binding works
- Local access works