Package Exports
- stopdb
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stopdb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
StopDB
en-US
This package is a simple local database!
Installation
npm i stopdb
Example
const LD = require('stopdb')
const path = require('path')
const db = new LD.Database(path.join(__dirname, "db.json")) //Create a .json file for your database!
console.log(db.data) //All data from the database are here!
db.data.users = [
{
username: "Player 1",
id: 1
},
{
username: "Player 2",
id: 2
}
] //Set the new data
db.save() //New data has been saved to file!
It's very simple!
pt-BR
Este pacote é um banco de dados local simples!
Instalação
npm i stopdb
Exemplo
const LD = require('stopdb')
const path = require('path')
const db = new LD.Database(path.join(__dirname, "db.json")) //Crie um arquivo .json para o seu banco de dados!
console.log(db.data) //Todos os dados do banco de dados estão aqui!
db.data.users = [
{
username: "Jogador 1",
id: 1
},
{
username: "Jogador 2",
id: 2
}
] //Defina os novos dados!
db.save() //Os novos dados foram salvos no arquivo!
É bem simples!