micro365/data/scripts/db.mjs

15 lines
257 B
JavaScript
Raw Permalink Normal View History

2023-08-03 19:39:01 +00:00
import Knex from 'knex'
export const db = Knex({
client: 'sqlite3', // or 'better-sqlite3'
connection: {
filename: "../database"
}
})
export const getWords = async (db) => {
return db
.select("word")
.from("dictionary")
2023-08-05 20:11:43 +00:00
}