Quick Start
Quickly take the first steps to PeakDB.
Create a Remote Server
If you want, you can create a server and access that server remotely. If you are not going to use a server, you can also use it locally.
const example_server = new <PeakDB>.Server({
"port": 4951,
"users": [
{
"username": "fir4tozden",
"password": "ZdJuTNqUXpqNrw2H",
"permissions": 1 << 0 | 1 << 3 // read and delete
},
{
"username": "nehir",
"password": "yPIkXo3l82aMbJZc",
"permissions": 1 << 0 | 1 << 1 | 1 << 2 // read, write and update
}
]
});Connect to Remote Server
After creating the server, connect to the server.
Create a Collection
You need to create a collection to store your data. You can do this with the following constructor. If you want to store your data as a collection, you need to set the collection type to 0. In this case, the data can be filtered more easily. If you want to make it key-value, you need to set the collection type as 1. In this case, you can assign a value to a key. For example username=fir4tozden.
Store Data
Each collection type has different methods to store your data. For example, you can use this method in document-based collections. For key-value-based collections you can use it like this for example.
For key-value-based collections you can use it like this for example.
These are just a few examples of being able to use PeakDB. Check out the documentation for more.
Last updated