An util package to export a database as an api.
npm install nettle-api-databasejs
const { Database } = require('nettle-api-database');
/* using import
import { Database } from 'nettle-api-database';
*/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
`php
$httpGet[https://..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
`php
$httpGet[https://..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
`php
$httpGet[https://..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
`php
$httpGet[https://..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
`php
$httpGet[https://..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
`php
$httpGet[https://..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
`php
$httpGet[https://..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.]
``