NeatDB
Easiest database. Ever.
Table of contents
Why
Storing data shouldn't be hard, never. Even if using a database. It should be beginner friendly, but powerful enough to be used by everyone.
This is why I'm developing NeatDB.
Do you need to simply store data? You need to retrieve data too? Or maybe you need to connect to a database on a remote server. With NeatDB all these actions are as easy as installing a Node package.
How
NeatDB uses JSONs, just like MongoDB, but in a slightly different way. The way NeatDB is developed, lets you use a database like a JSON, but like a database too.
It can easily store data and retrieve easily the data you stored just with a few functions. Just create a Database with the NeatDB and enjoy!
Install
To install NeatDB and the CLI, just type in the command line
npm install neatdb -g
Make sure to be sudo on Linux
Usage
Javascript
To create a new database, with NeatDB installed, just type in the command line
neat -n settings.json
where settings.json is the path to a json file that follows the structure explained in the documentation.
Then you just need to import in your Node.JS program neatdb and create a new NeatDB with the database name you previously created.
const NeatDB = let db = "tryDB"
And thats it! Now you can, for example, try to create a new key in the database, like this
db
Everything is saved in real time, so you don't need to worry for some problem during the server execution, everything will be saved in real time and you don't need to do anything!
For further information, check the official documentation
Server mode
The NeatDB CLI has a server mode too! The server mode lets clients open and modify database that are on your server via HTTP requests.
Just create a database like before and to let someone connect to the server type in command line
neat -l
or, to open the server on a custom port (default is 8080)
neat -l 1234
The server will start listening for requests of getting of saving the database. To connect to a remote database with Javascript just do like this
const NeatDB =let db = "tryDB" host: "http://127.0.0.1" password: "123456"
Now, every change is in real time! The change will be registered on the host server with an asynchronous request, so it won't even block the execution of your program.
For further information, check the official documentation
Features
- Create a JSON database
- Add and delete data in the database
- Find data in simple but powerful way using functions
- Hosting a database on a server
- Live saving of the database
- Simplicity
Future
I have a lot of projects and ideas in mind to make NeatDB more awesome!
Known Issues
- First connection to a remote database is pretty slow
Future Projects
- Graphical Interface to visualize local and remote database, and to "GUIze" the CLI
- Python Library
Support
For support, just open an issue or contact me at gianlutara@gmail.com. In icon used an svg by Pixel perfect from www.flaticon.com.