playin with sqlite
This commit is contained in:
1151
package-lock.json
generated
1151
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@
|
||||
"@mdi/font": "7.0.96",
|
||||
"core-js": "^3.34.0",
|
||||
"roboto-fontface": "*",
|
||||
"sqlite": "^5.1.1",
|
||||
"sqlite3": "^5.1.7",
|
||||
"vue": "^3.3.0",
|
||||
"vuetify": "^3.0.0"
|
||||
},
|
||||
|
||||
@@ -13,8 +13,12 @@ import App from './App.vue'
|
||||
// Composables
|
||||
import { createApp } from 'vue'
|
||||
|
||||
async function run() {
|
||||
const app = createApp(App)
|
||||
|
||||
registerPlugins(app)
|
||||
|
||||
app.mount('#app')
|
||||
}
|
||||
|
||||
run()
|
||||
|
||||
@@ -8,10 +8,18 @@
|
||||
import vuetify from './vuetify'
|
||||
import pinia from '../store'
|
||||
import router from '../router'
|
||||
import sqliteplugin from './sqliteplugin'
|
||||
|
||||
import sqlite3 from 'sqlite3'
|
||||
|
||||
// Types
|
||||
import type { App } from 'vue'
|
||||
|
||||
export function registerPlugins(app: App) {
|
||||
app.use(vuetify).use(router).use(pinia)
|
||||
const defaultDatabaseFileName = './testdb.db'
|
||||
|
||||
export async function registerPlugins(app: App) {
|
||||
|
||||
const db = new sqlite3.Database(defaultDatabaseFileName)
|
||||
|
||||
app.use(vuetify).use(router).use(pinia).use(sqliteplugin)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { open } from 'sqlite'
|
||||
|
||||
const defaultDatabaseFileName = './testdb.db'
|
||||
|
||||
export default {
|
||||
install(app, options) {
|
||||
// let database = await open({
|
||||
// filename: defaultDatabaseFileName,
|
||||
// driver: sqlite3.Database
|
||||
// })
|
||||
|
||||
console.log('potato')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ export enum CharacterStatus {
|
||||
Inactive = 'Inactive',
|
||||
Dead = 'Dead',
|
||||
Retired = 'Retired'
|
||||
}
|
||||
|
||||
export type Character = {
|
||||
status: CharacterStatus
|
||||
|
||||
Reference in New Issue
Block a user