broly-bdfd
v0.0.8
Published
An util package to export a database as an api.
Downloads
3
Readme
broly-bdfd
How to start?
const { Database } = require('broly-bdfd');
/* using import
import { Database } from 'broly-bdfd';
*/
const db = new Database();
db.setPort(8080) /* Choose your port. */
db.init() /* Enable all apis. */
Please run the file and follow this github page to host your repl.
Endpoints bdscript
The package is made with express and quick.db.
You don't have rate limit. So enjoy.
Set the value of a var.
GET
/set
$httpGet[https://<repl_name>.<replit_username>.repl.co/set?key=$message&value=$cropText[$message;$sum[$charCount[$message[1]]];]]
$httpResult[data;key] $c[// the variable name.]
$httpResult[data;old_value] $c[// the old variable value.]
$httpResult[data;new_value] $c[// the new variable value.]
Get data about a var.
GET
/get
$httpGet[https://<repl_name>.<replit_username>.repl.co/get?key=$message[1]]
$httpResult[data;key] $c[// the variable name.]
$httpResult[data;value] $c[// the variable value.]
Delete the data of a var.
GET
/delete
$httpGet[https://<repl_name>.<replit_username>.repl.co/delete?key=$message[1]]
$httpResult[data;key] $c[// the variable name.]
$httpResult[data;value] $c[// the variable value.]
Delete the data of all vars.
GET
/delete/all
$httpGet[https://<repl_name>.<replit_username>.repl.co/delete/all]
$httpResult[data;variables] $c[// the name of all the deleted variables inside an array.]
Get the data of all vars.
GET
/get/all
$httpGet[https://<repl_name>.<replit_username>.repl.co/get/all]
$httpResult[data;list] $c[// the name & value of all the existing variable inside an array.]
Create a var with the specified data.
GET
/create
$httpGet[https://<repl_name>.<replit_username>.repl.co/create?key=$message[1]&value=$cropText[$message;$sum[$charCount[$message[1]]];]]
$httpResult[data;key] $c[// the variable name.]
$httpResult[data;value] $c[// the variable value.]
Rename a var with the selected name.
GET
/rename
$httpGet[https://<repl_name>.<replit_username>.repl.co/rename?key=$message[1]&value=$cropText[$message;$sum[$charCount[$message[1]]];]]
$httpResult[data;old_key] $c[// the old variable name.]
$httpResult[data;new_key] $c[// the new variable name.]
$httpResult[data;value] $c[// the variable value.]