let themes = db.query(sql, [user.id], async (err, result) => {
if(err) console.error(err);
console.log(result);
await result;
});
return fetch(`/api/items/create/`)
.then(response => response.json())
.catch((err) => {
window.console.error(err);
throw err;
});
});
async function start() {
const Hapi = require('hapi');
const server = Hapi.server({});
try {
await server.start();
}
catch (err) {
console.log(err);
}
};
start();