1.0.9 • Published 5 years ago
httpmongodb v1.0.9
httpmongodb
added this line in .env
DB=<db name>
MONGOURL=<mongo url>connection (i recommend this cone use listening pode page)
...
var express = require('express');
var httpmongodb = require('httpmongodb'); //<-- added this line
var app = express();
app.use(mongoSrivice("Asia/Kolkata", true)); //<-- added this lineinsert
await req.DBinsert("<Documents or Table name>", {<insert object>});find data via object
await req.DBfind('<Documents or Table name>', {<find object>});find all get data in table
await req.DBshowAll('<Documents or Table name>');find data via object but retuen only array no status
await req.DBfindData('<Documents or Table name>', {<find object>});find singel data via _id
await req.DBshowSingel('<Documents or Table name>', <use db _id>);update data via _id
await req.DBupdate('<Documents or Table name>', <use db _id>, {<use update object>}); update data via object
await req.DBCupdate('<Documents or Table name>', {update key in object}, {<use update object>});delete data via _id
await req.DBDelete('<Documents or Table name>', <use db _id>);