Hosting HQ RemoteDB is a service that provides Hosting HQ clients and non-clients a remote database solution to ease the burden of utilizing complex frameworks to manage their database.
-
RemoteDB API Client ID (Check your Dashboard)
-
RemoteDB API Token (Check your Dashboard)
-
Validated RemoteDB License (Don't have one? Purchase one here)
- Node.js v12 or higher
const Database = require("remotedb");
const db = new Database("client_id", "token", [options]);
// Without async function
db.set("key", "value", [expire]).then(() => {
});
// With async function
await db.set("key", "value");
// Without async function
db.get("key").then(() => {
});
// With async function
await db.get("key");
// Without async function
db.delete("key").then(() => {
});
// With async function
await db.delete("key");
- You can set the default response object using the class. It will return what you set it to until you edit the class.
const Database = require("remotedb");
const db = new Database("client_id", "token", [p, s, o, d]);
/**
* Options accept only boolean (true or false) values.
* There are four option values, all are optional but you must specify them all if you want a specific option only.
* By default, it will return the entire response object, but you can set it to return only the prettified object, the entire object, the response status, or the data object itself.
*
* p = prettified object (will show prettified errors too)
* s = status (will only show the HTTP status code)
* o = object (true by default, it will show the entire response object)
* d = data object (will only show the data object)
*/
- If you do not want to configure the class, you can get your desired value through the response object.
- You can set the default response object using the class. It will return what you set it to until you edit the class.
const Database = require("remotedb");
const db = new Database("client_id", "token", [p, s, o, d]);
/**
* Options accept only boolean (true or false) values.
* There are four option values, all are optional but you must specify them all if you want a specific option only.
* By default, it will return the entire response object, but you can set it to return only the prettified object, the entire object, the response status, or the data object itself.
*
* p = prettified object (will show prettified errors too)
* s = status (will only show the HTTP status code)
* o = object (true by default, it will show the entire response object)
* d = data object (will only show the data object)
*/
- If you do not want to configure the class, you can get your desired value through the response object.
- You can set the default response object using the class. It will return what you set it to until you edit the class.
const Database = require("remotedb");
const db = new Database("client_id", "token", [p, s, o, d]);
/**
* Options accept only boolean (true or false) values.
* There are four option values, all are optional but you must specify them all if you want a specific option only.
* By default, it will return the entire response object, but you can set it to return only the prettified object, the entire object, the response status, or the data object itself.
*
* p = prettified object (will show prettified errors too)
* s = status (will only show the HTTP status code)
* o = object (true by default, it will show the entire response object)
* d = data object (will only show the data object)
*/
- If you do not want to configure the class, you can get your desired value through the response object.
You can view our API documentation including API changelog at https://docs.hostinghq.xyz/api
You can get support with RemoteDB and our packages in our Official Discord Server
Contribution to our packages is restricted to authorized contributors. If you believe a change needs to be made, open an issue and we will review it.
Hosting HQ RemoteDB Python Package is Licensed under GPL-3.0. The full license can be viewed here