Create public/index.html
Browse files- public/index.html +27 -0
public/index.html
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="id">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>File List</title>
|
| 7 |
+
<script>
|
| 8 |
+
fetch('/file-list')
|
| 9 |
+
.then(res => res.json())
|
| 10 |
+
.then(files => {
|
| 11 |
+
const ul = document.getElementById('file-list');
|
| 12 |
+
files.forEach(file => {
|
| 13 |
+
const li = document.createElement('li');
|
| 14 |
+
const link = document.createElement('a');
|
| 15 |
+
link.href = file;
|
| 16 |
+
link.textContent = file;
|
| 17 |
+
li.appendChild(link);
|
| 18 |
+
ul.appendChild(li);
|
| 19 |
+
});
|
| 20 |
+
});
|
| 21 |
+
</script>
|
| 22 |
+
</head>
|
| 23 |
+
<body>
|
| 24 |
+
<h1>Available Files</h1>
|
| 25 |
+
<ul id="file-list"></ul>
|
| 26 |
+
</body>
|
| 27 |
+
</html>
|