File: static_files.py

package info (click to toggle)
python-aiohttp 3.8.4-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,492 kB
  • sloc: python: 41,859; ansic: 25,006; makefile: 369; javascript: 31
file content (9 lines) | stat: -rwxr-xr-x 181 bytes parent folder | download | duplicates (27)
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)