File: static_files.py

package info (click to toggle)
python-aiohttp 3.7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,640 kB
  • sloc: python: 40,369; ansic: 15,798; makefile: 382
file content (9 lines) | stat: -rwxr-xr-x 181 bytes parent folder | download | duplicates (29)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env python3
import pathlib

from aiohttp import web

app = web.Application()
app.router.add_static("/", pathlib.Path(__file__).parent, show_index=True)

web.run_app(app)