- Introduced common.js for shared functions including API calls, error reporting, and UI helpers. - Implemented feedback.js for the feedback reporting page, including form handling and displaying feedback status. - Added layout.js for managing galaxy and section layouts in the visualization. - Created login.js for user authentication with session management. - Developed search.js for term searching based on user input and synonyms. - Implemented signup.js for user registration with validation and immediate login.
21 lines
680 B
Python
21 lines
680 B
Python
"""python -m server [--host 0.0.0.0] [--port 8000] [--reload]"""
|
|
import argparse
|
|
import os
|
|
|
|
import uvicorn
|
|
|
|
|
|
def main():
|
|
ap = argparse.ArgumentParser()
|
|
ap.add_argument("--host", default="127.0.0.1")
|
|
ap.add_argument("--port", type=int, default=8000)
|
|
ap.add_argument("--reload", action="store_true")
|
|
a = ap.parse_args()
|
|
# 리버스 프록시(시놀로지 등) 뒤: X-Forwarded-For/Proto 로 실제 방문자 IP·https 여부를 인식
|
|
uvicorn.run("server.app:app", host=a.host, port=a.port, reload=a.reload, proxy_headers=True,
|
|
forwarded_allow_ips=os.environ.get("ATLAS_FORWARDED_ALLOW_IPS", "*"))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|