import aiohttp
import aiohttp.web

from mnemosyne.app import by_time, by_uuid

application = aiohttp.web.Application()

# by_uuid API
# app.router.add_route('GET', '/applications', mnemosyne.applications.index)
application.router.add_route('GET', '/trace/{traceUuid}', by_uuid.getTrace)
application.router.add_route('GET', '/transaction/{transactionUuid}', by_uuid.getTransaction)
application.router.add_route('GET', '/application/{applicationUuid}', by_uuid.getApplication)

# by_time API
application.router.add_route('GET', '/traces/frontend/age/{ageInMin}', by_time.getFrontendTraces)

@@ -1,20 +1,31 @@
+%0Aimport os%0A
 import aiohttp%0Aimpor
@@ -128,98 +128,525 @@
 ()%0A%0A
-# by_uuid API%0A# app.router.add_route('GET', '/applications', mnemosyne.applications.index)
+class DirectoryIndex(aiohttp.web.StaticRoute):%0A    def handle(self, request):%0A        filename = request.match_info%5B'filename'%5D%0A%0A        if not filename:%0A            filename = 'index.html'%0A        elif filename.endswith('/'):%0A            filename += 'index.html'%0A%0A        request.match_info%5B'filename'%5D = filename%0A%0A        return super().handle(request)%0A%0Apublic_dir = os.path.abspath(os.path.join(__file__, '../../../public'))%0A%0Aapplication.router.register_route(DirectoryIndex(None, '/', public_dir))%0A%0A%0A# by_uuid API
 %0Aapp
@@ -739,32 +739,37 @@
 outer.add_route(
+%0A    
 'GET', '/transac
@@ -838,32 +838,37 @@
 outer.add_route(
+%0A    
 'GET', '/applica
@@ -952,32 +952,37 @@
 outer.add_route(
+%0A    
 'GET', '/traces/

Add static route serving files