@windingtree/wt-search-api
Version:
NodeJS app that enables quick search over data from Winding Tree platform
32 lines (28 loc) • 503 B
JavaScript
const Permanent = require('./permanent');
const Indexed = require('./indexed');
/**
* Create all necessary tables.
*
* @return {Promise<void>}
*/
const setupDB = async () => {
await Promise.all([
Permanent.setupDB(),
Indexed.setupDB(),
]);
};
/**
* Bring the database to the initial empty state.
*
* @return {Promise<void>}
*/
const resetDB = async () => {
await Promise.all([
Permanent.resetDB(),
Indexed.resetDB(),
]);
};
module.exports = {
setupDB,
resetDB,
};