baas_sdk
v4.5.3
Published
> A relax project,Let web developer have this ability to operate the mongoDB database
Downloads
8
Readme
relax
A relax project,Let web developer have this ability to operate the mongoDB database
Build Setup
# install dependencies
npm install
//import module
const {config_server,baas_data} = require('baas_sdk');
//config server info
config_server('127.0.0.1',3000,'your token');
//send data to server
(async()=>{
//create data
const result = await new baas_data('test').create({
name:'xiaos',
age:22
}).exec();
//find data
const find_result = await new baas_data('test').find({
name:'xiaos'
}).exec();
//update data
const updated = await new baas_data('test').update({
name:'xiaos'
},{$set:{age:23}}).exec();
//remove data
const removed = await new baas_data('test').remove({
name:'xiaos'
}).exec();
})()