node operation mongodb database

install cnpm install mongodb Create database //create object var MongoClient = require('mongodb').MongoClient; //Configure url and port var url = "mongodb://localhost:27017/runoob"; //link MongoClient.connect(url, function(err, db) { if (err) throw err; console.log("Database created!"); db.close(); ...

Posted on Sun, 05 Apr 2020 01:36:45 -0400 by nyi8083

MongoDB learning (II) visual interface

1, Installation visualization interface 1. Mongo booster installation and configuration 1. Download and install Download address: https://nosqlbooster.com/downloads Click Install directly after downloading: Pop up interface after installation: 2. Click create to create the link: 3. Click the Test Connection test link: 4. After the test is O ...

Posted on Sat, 04 Apr 2020 12:43:39 -0400 by madolia

Mongodb series - java client simple use (CRUD)

Mongodb provides many clients: shell,python, java, node.js... And so on Simple addition, deletion, modification and query based on java Here we first encapsulate a mongodb management class: import java.util.ArrayList; import java.util.List; import java.util.Map; import org.bson.Document; import org.slf4j.Logger; import org.slf4j.Log ...

Posted on Sat, 04 Apr 2020 06:09:45 -0400 by Celadon

Redis introduction and implementation of lock and count

1, About RedisRedis (Remote Dictionary Server), that is, remote dictionary service, is an open-source log and key value database written in ANSI C language, supporting network, memory based and persistent, and provides API s in multiple languages.Redis supports more value types, including string, list, set, Zset and hash. These data types supp ...

Posted on Fri, 03 Apr 2020 11:42:01 -0400 by ThoughtRiot

04 mongodb data operation (add, delete, modify and query)

04 mongodb data operation (add, delete, modify and query) insert When inserting a document, MongoDB assigns a unique ObjectId to the document without specifying the ﹣ id parameter Syntax: db. Set noun. insert(document) > db.stu.insert({name :"EricChen",age : 23}) WriteResult({ "nInserted" : 1 }) > db.stu.find() { ...

Posted on Fri, 03 Apr 2020 03:17:24 -0400 by five

Common operations for mongodb

#Backupmongodump.exe -h 127.0.0.1:27017 -d medicine -c jddj -o C:\MongoDB\Server\4.2\backup#Recoverymongorestore.exe -h 127.0.0.1:27017 -d medicine -c jddj C:\MongoDB\Server\4.2\backup\medicine\jddj.bson #Export json, csv data mongoexport.exe -h 127.0.0.1:27017 -d medicine -c jddj -o E:\Crawler Project\json\jddj.json mongoexport.exe -h 127.0.0 ...

Posted on Fri, 03 Apr 2020 01:38:58 -0400 by verlen

[MongoDB] aggregate the key embedded in the object

The title is rather awkward. Here is a specific example MongoDB 3.6 Data sample { "_id" : ObjectId("5a79391534cdbd692825e978"), "cdn" : "Conversant", "domain" : "7img1.xxxx.com", "status_code" : { "200" : 80, "206" : 3, "404" : 2, "304" : 4 } } The status &quo ...

Posted on Fri, 03 Apr 2020 01:17:19 -0400 by alex_lana

Spring boot tool class static attribute injection and multi environment configuration

Because the MongoDB needs to be accessed, but the local development environment cannot directly connect to MongoDB, the 127.0.0.2 local IP agent needs to be used through SecureCRT. However, after the program is deployed to the online production environment, it can directly access MongoDB. Therefore, after the program is developed, you always ne ...

Posted on Tue, 31 Mar 2020 04:31:59 -0400 by pandu345

Use of springboot~WebTestClient

When using springboot for development, unit testing is necessary. When you build a spring project, it will generate a test project for us. When your project starts, the test cases are carried out at the same time. When we carry out the integration test of the WEB layer, we can use the WebTestClient tool provided by spring for us, which is very ...

Posted on Mon, 30 Mar 2020 14:33:54 -0400 by nkyoung1

The function of Vue module is comprehensive table (VIII) update and delete of table data

The function of Vue module is comprehensive table (VIII) update and delete of table data Technology stack Vue family bucket: Front end framework Vue.js State management Vuex Dynamic route matching Vue router http services axios Module packaging web pack UI framework element Data server Server side node.js node based web fra ...

Posted on Sun, 29 Mar 2020 12:26:53 -0400 by Tsukiyomi