spikie.db

$ npm install spikie.db

Usage no npm install needed!

<script type="module">
  import spikieDb from 'https://cdn.skypack.dev/spikie.db';
</script>

README

NPM version NPM downloads

NPM Banner

Installation

$ npm install spikie.db

DISCORD.JS

Example

spikieDB

1. Importing the package

const { spikieDB } = require("spikie.db"); // or import { spikieDB } from "spikie.db"; 

2. Establishing and exporting spikieDB

const db = new spikieDB({ uri: "your mongodb connection string", }); module.exports = db; 

3. Example on using it

const db = require("./db.js"); // replace db.js with your file path to the setup of spikieDB db.set("numbers", "123"); 

Methods

.set

// saves data to database db.set("key", "value"); 

.get

// gets value from key db.get("key"); // returns => value 

.has

// returns boolean db.has("key"); // returns => true 

.delete

// deletes data db.delete("key"); // checking for data db.has("key"); // returns => false