Skip to content

Commit e81c961

Browse files
committed
Add __main__
1 parent ea12d50 commit e81c961

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/tourist/__main__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import os
2+
import subprocess
3+
4+
import uvicorn
5+
6+
7+
def main() -> None:
8+
print(f"TOURIST🤳 [v{os.getenv('TOURIST_VERSION')}]")
9+
uvicorn_run = "uvicorn tourist.app:create_app --host 0.0.0.0 --port 8000 --workers 1 --log-level debug --factory"
10+
xvfb_run = f"xvfb-run -n 99 --server-args='-screen 0 1024x768x24' {uvicorn_run}"
11+
with subprocess.Popen(xvfb_run, shell=True) as process:
12+
process.wait()
13+
14+
15+
if __name__ == "__main__":
16+
main()

0 commit comments

Comments
 (0)