DBhub - it is easy-use application for creation databases for your project. Now, you don't have to waste a lot of time for set up your environment.
- Just open dbhub site
- Click "Create Database" button
- Choose nodeJS or python version and use it in your code.
- Install pip package "dbhub" by using this command in terminal:
pip install dbhub
- Import dbhub in your code by writing this code:
from dbhub import get_database
- Copy api-key from site and paste it in constans or variable in your code.
api_key = '9ab75642-f0a6-24b4-8143-f9844261aedd'
- Get database control interface:
db = get_database(api_key)
- Creating collections:
collection_name = 'example'
collection = db.get_collection(collection_name)
- Create/Read/Update/Delete items in this collection:
collection.create(element)
collection.read(id)
collection.update(id, element)
collection.delete(id)
- Install npm package "dbhub" by using this command in terminal:
npm install dbhub -s
- Import dbhub in your code by writing this code:
const {getDatabase} = require('dbhub');
- Copy api-key from site and paste it in constans or variable in your code.
let apiKey = '9ab75642-f0a6-24b4-8143-f9844261aedd';
- Get database control interface:
let db = getDatabase(apiKey);
- Creating collections:
let collectionName = 'example';
let collection = db.getCollection(collectionName);
- Create/Read/Update/Delete items in this collection:
collection.create(element).then((id) => {});
collection.read(id).then((element) => {});
collection.update(id, element).then((success) => {});
collection.delete(id).then((success) => {});