-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_server.py
More file actions
23 lines (20 loc) · 907 Bytes
/
Copy pathrun_server.py
File metadata and controls
23 lines (20 loc) · 907 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os
import sys
from waitress import serve
from config.wsgi import application
# This script starts the Library System for the whole college network
if __name__ == '__main__':
print("--------------------------------------------------")
print(" GECDahod Library System - Production Server")
print("--------------------------------------------------")
print("Starting server on port 800.")
try:
# host='0.0.0.0' makes it accessible to the local network
# port=800 is the standard web port (no need to type :8000)
serve(application, host='0.0.0.0', port=800, threads=8)
except Exception as e:
print(f"\n Error: {e}")
if "Permission denied" in str(e):
print("\n Tip: Port 80 requires 'Administrator' privileges.")
print("Try running your terminal as Administrator, or change port to 8080.")
sys.exit(1)