Files
plain-ub-overfork/run
thedragonsinn 32db859d7e Initial Commit.
2023-09-25 18:28:01 +05:30

18 lines
382 B
Bash
Executable File

#!/bin/sh
if [ "$API_PORT" ] ; then
py_code="
from aiohttp import web
app = web.Application()
app.router.add_get('/', lambda _: web.Response(text='Web Server Running...'))
web.run_app(app, host='0.0.0.0', port=$API_PORT, reuse_port=True, print=None)
"
python3 -q -c "$py_code" & echo "Dummy Web Server Started..."
fi
if ! [ -d ".git" ] ; then
git init
fi
python3 -m app