Save, get and delete variables from the database, using the DatabaseManager.
var { API } = require("easy-api.ts");var { QuickDB } = require("quick.db"); var api = new API(...); var db = new QuickDB();api.db.setDatabase(db);// api.db is the DatabaseManager.// api.db.driver is the database itself. // Connecting the database manually.api.db.start(/* Method to connect your database without being called. (ex. <CustomDB>.connect) */); api.connect({ port: 5000 });
var { API } = require("easy-api.ts"); var api = new API(...); // Connecting the default database.api.db.start(api.db.driver.start); api.connect({ port: 5000 });