Add index and main

This commit is contained in:
Valentin Tolmer 2021-05-08 12:00:52 +02:00
parent c58459547b
commit f8951d3b82
3 changed files with 24 additions and 0 deletions

5
app/build.sh Executable file
View File

@ -0,0 +1,5 @@
#! /bin/sh
cd $(dirname $0)
wasm-pack build --target web
rollup ./main.js --format iife --file ./pkg/bundle.js

13
app/index.html Normal file
View File

@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>LLDAP Administration</title>
<script src="/pkg/bundle.js" defer></script>
</head>
<body>
</body>
</html>

6
app/main.js Normal file
View File

@ -0,0 +1,6 @@
import init, { run_app } from './pkg/lldap_app.js';
async function main() {
await init('/pkg/lldap_app_bg.wasm');
run_app();
}
main()