fast-calorie/public/js/db.js

15 lines
294 B
JavaScript

import Dexie from '/vendor/js/dexie.js';
const db = new Dexie('fast');
db.version(1).stores({
catalog: '++id, value, type, target',
entries: '++id, day, type'
});
db.open().catch(function (err) {
console.error('Failed to open db: ' + (err.stack || err));
});
export default db;