fortydb
v0.0.2
Published
A simple local database
Downloads
1
Maintainers
Readme
FortyDB (BETA)
A simple database for small projects or blogs. This database is completely local and is in beta phase.
Version 0.0.2
Functions
- Starting Services
- Get Data
- General Data
- Specifies
- Base Data
- Set Data
- Simple Data
- Base Data
- File (Coming Soon)
- From Server (Coming Soon)
- Server (Coming Soon)
- User Service
- Settings
- Notes
1. Starting Services
Installing FortyDB on your project:
npm install fortydb
Once fortydb is installed in your project, call our services
// ADMINISTRATOR OF DATABASE
const {Admin} = require('fortydb');
// DEFAULT SETTINGS VARIABLE
const database = new Admin();
// VARIABLE OF DATA FROM DATABASE
let data = database.start(); // THIS RETURN JSON OBJECT
console.log(data)
// OUTPUT
{
date: "Date",
data: {
simple: {},
base: [],
code: "ASdjsakdfjaksjdljqi12983912",
files: {
data: [],
locals: false
}
}
}
Get Data
For get data is very simple
// GET ALL DATA
let all_data = database.start();
// GET SPECIFIES DAT
let specificies_data = database.getData('name_of_data');
// GET BASE DATA
let base_data = database.getBase(0) // NUMBER OR POSITION OF DATA
Set Data
You can save any information such as: Strings, Objects, Arrays
// SET DATA IN THE DATABASE
database.setData('name_of_data', 'data');
// SET BASE DATA IN THE DATABASE
database.setBase('data');
User Service
Users as such do not exist, but it is the way to connect directly to the database, if you forget the password or the user will lose all their information.
The user consists of a username and a password, in the end only with these two can open the database, each database depends only on these 2, there is no security code or any other service.
// ADMINISTRATOR OF DATABASE
const {Admin} = require('fortydb');
// VARIABLE LOGIN
const database = new Admin({
user: {
user: "FortyDB",
password: "Example123"
}
});
Settings
// ADMINISTRATOR OF DATABASE
{
route: "./routeDatabaseFolder",
user: {
user: "admin",
password: "admin"
}
name: "name_of_database.fdb"
};
Notes
The database is in beta phase therefore it only has basic functions. We are currently at version 0.0.1
The database is not recommended to be used for large or highly confidential projects since the database does not have good security. But it is fully functional if the case is that you want to save info for your application or blog. Or simply for a web app where there is a login and user registration.
For greater stability and speed, an advanced mode will be added in which each data has a very specific space on the disk