mirror of
https://github.com/linuxserver/docker-ffmpeg.git
synced 2026-02-20 04:56:23 +08:00
17 lines
392 B
Python
17 lines
392 B
Python
from aiohttp import web
|
|
import socketio
|
|
|
|
sio = socketio.AsyncServer()
|
|
app = web.Application()
|
|
sio.attach(app)
|
|
|
|
async def index(request):
|
|
with open('./public/index.html') as f:
|
|
return web.Response(text=f.read(), content_type='text/html')
|
|
|
|
app.router.add_get('/', index)
|
|
app.router.add_static('/public/', path=str('./public/'))
|
|
|
|
if __name__ == '__main__':
|
|
web.run_app(app, port=8787)
|