Include initial web router

This commit is contained in:
Kleissner
2022-09-24 16:56:20 +02:00
parent c862532b2d
commit f8f2d2cbfb
8 changed files with 143 additions and 17 deletions

View File

@@ -20,7 +20,21 @@ The config filename is hard-coded to `Config.yaml` and is created on the first r
Todo.
## Static Pages
Access to `/` will show a generic information page.
The main functionality is to provide URLs in the format `/[blockchain public key]/[file hash]` and other variations (using a directory name instead of file hash). This page shall provide access to one or multiple files shared via a user's blockchain. Access shall include download, preview, and providing a native Peernet link. The blockchain public key may be the node ID or the peer ID. Currently only hex encoding is supported.
Native Peernet linsk should start with the `peernet://` custom scheme. On Windows such links can be opened with a registered protocol handler.
To provide the best user experience, those static pages shall be generated immediately and use JavaScript to dynamically load the requested resource using the embedded API.
## API
Todo.
## Cache
Todo. A cache folder should temporarily cache requested files so that they are available faster.