Skip to content

Commit

Permalink
adds handler for archive creation
Browse files Browse the repository at this point in the history
  • Loading branch information
pelid committed Apr 15, 2019
1 parent 65a441a commit 66e6089
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
import aiofiles


async def archivate(request):
raise NotImplementedError


async def handle_index_page(request):
async with aiofiles.open('index.html', mode='r') as index_file:
index_contents = await index_file.read()
Expand All @@ -12,5 +16,6 @@ async def handle_index_page(request):
app = web.Application()
app.add_routes([
web.get('/', handle_index_page),
web.get('/archive/{archive_hash}/', archivate),
])
web.run_app(app)

0 comments on commit 66e6089

Please sign in to comment.