mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 18:01:39 +00:00
feature/dwn echo middleware (#17)
* refactor: remove indexedDB dependency and replace with browser filesystem * refactor: remove unused layout templating from global block * feat: add support for building from source * feat: add Credential creation and retrieval via Dexie database * feat: add breadcrumbs component
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package scripts
|
||||
|
||||
templ InitializeDatabase() {
|
||||
<script type="module">
|
||||
// Import Dexie
|
||||
import { Dexie } from 'https://unpkg.com/dexie/dist/modern/dexie.mjs';
|
||||
|
||||
// Create a new Dexie database
|
||||
const db = new Dexie('myDatabase');
|
||||
|
||||
// Define the schema for the database
|
||||
db.version(1).stores({
|
||||
users: '++id, name, age',
|
||||
posts: '++id, title, content, authorId',
|
||||
comments: '++id, content, postId, authorId',
|
||||
});
|
||||
|
||||
// Export the database instance
|
||||
export default db;
|
||||
</script>
|
||||
}
|
||||
Reference in New Issue
Block a user