mirror of
https://github.com/appy-one/acebase.git
synced 2026-05-25 22:01:21 -06:00
22 lines
No EOL
660 B
HTML
22 lines
No EOL
660 B
HTML
<html>
|
|
<head>
|
|
<script src="browser.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
// Create AceBase using IndexedDB
|
|
const db = AceBase.WithIndexedDB('mydb');
|
|
db.ready(async () => {
|
|
console.log('Database ready to use');
|
|
|
|
const ref = await db.ref('browser').set({
|
|
test: 'AceBase runs in the browser!'
|
|
});
|
|
console.log(`"${ref.path}" was saved!`);
|
|
|
|
const snap = await ref.get();
|
|
console.log(`Got "${snap.ref.path}" value:`, snap.val());
|
|
})
|
|
</script>
|
|
</body>
|
|
</html> |