How to create your Server
//Importing the module
const db = require('cloud-json');
//Creating a new server
db.Server(3000, "APIKEY");
//You have created a server at the port 3000
//The APIKEY is very important it stops from random people using your database
How to use your Server
//Importing the module
const db = require('cloud-json');
//Setting the database
db.Database("http://localhost:3000", "APIKEY")
//DO NOT ADD A / AFTER THE URL, IT WILL BREAK!
//Change the APIKEY part to your api key
Using set function
//Importing the module
const db = require('cloud-json');
//Setting the database
db.Database("http://localhost:3000", "APIKEY")
//DO NOT ADD A / AFTER THE URL, IT WILL BREAK!
//Change the APIKEY part to your api key
//Setting key & value
db.set("SWORD", "100DMG");
Using get function
//Importing the module
const db = require('cloud-json');
//Setting the database
db.Database("http://localhost:3000", "APIKEY")
//DO NOT ADD A / AFTER THE URL, IT WILL BREAK!
//Change the APIKEY part to your api key
//Getting value of key
db.get("SWORD");
//returns "100DMG"
Using a del function
//Importing the module
const db = require('cloud-json');
//Setting the database
db.Database("http://localhost:3000", "APIKEY")
//DO NOT ADD A / AFTER THE URL, IT WILL BREAK!
//Change the APIKEY part to your api key
//Deleting key
db.del("SWORD");