Creating and configuring replica cluster of MongoDB cluster under Linux
Case demonstration:
1, In the linux environment, create three nodes on one machine, and create a replica set for the purpose of testing
1. First create three different data storage folders
[root@wugenqiang db]# cd /usr/local/mongodb/data/db
[root@wugenqiang db]# mkdir rs0-0
[root@wugenqiang db]# mkdir rs0-1
[root@wugenqiang db] ...
Posted by harristweed on Sat, 15 Feb 2020 07:53:45 -0800
Graylog building configuration details (centos7)
Graylog build configuration (centos7)
1, Basic environment
1. jdk environment required:
[root@iz2zee3zwuvnmai605c99vz ~]# java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-b10)
OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)
//If not, you need to install it. He ...
Posted by thepreacher on Sat, 15 Feb 2020 07:29:27 -0800
MongoDB series -- Aggregate pipeline operation in SpringBoot
MongoDB pipeline definition
The aggregation pipeline of MongoDB will pass the results of MongoDB documents to the next pipeline after one pipeline is processed. Pipeline operations are repeatable.
Common Aggregate pipeline operators of Aggregate in SpringBoot
Customize the collection userCollection and initialize the data structure
Store bean u ...
Posted by adnan856 on Wed, 05 Feb 2020 07:50:14 -0800
21 - URL crawling, Python asynchronous, Supervisor installation and configuration, etc
1. summary
Pseudo code can be referred to "Twenty climbing URL and initial assumption of participle sentiment analysis" , only to find that this can be done for a whole day, but most of the time is used to deploy the server.
Code placed in Large same-sex dating websites
In fact, it's very si ...
Posted by vinny69 on Mon, 03 Feb 2020 01:10:29 -0800
Review the basic use of mongoose
mongodb reference
mongoose official website
mongoose is more convenient to use
Using mongodb data driver to write an error log
For more information on the official data-driven mongodb of node
asset assertion is not used here
import mongodb from 'mongodb'
const MongoClient = mongodb.MongoClient
const url = 'mongodb://localhost:27017/edu'
expor ...
Posted by dannyluked on Fri, 24 Jan 2020 07:08:14 -0800
How to execute the equivalent SQL Join in MongoDB?
How to execute the equivalent SQL Join in MongoDB?
For example, say you have two sets (users and comments), and I want to extract all comments with pid = 444 and user information for each user.
comments
{ uid:12345, pid:444, comment="blah" }
{ uid:12345, pid:888, comment="asdf" }
{ uid:99999, pid:444, comment="qwer" }
users
{ uid ...
Posted by cyh123 on Tue, 21 Jan 2020 03:00:52 -0800
vue koa2 nuxt.js from scratch as front-end part of personal blog login registration function
0. Effect demonstration
It's annoying to plug in a video.You can go out and turn right to Youku. Click on me!).
1. Preparations
1.1 Front End Framework
The front end uses nuxt.js based on vue.js.Why use nuxt.js?
The first thing I did was a blog project, so SSR is important.Although it has nothing to do with the login registration described i ...
Posted by cpace1983 on Fri, 17 Jan 2020 10:56:30 -0800
Xuecheng Online - day 10 - handout - course release 1
1. Course release1.1 demand analysisAfter the course is published, a formal course details page will be generated. After the course is published, users can browse the course details page and start the course learning. The process of generating course details page by course publishing is the sam ...
Posted by we4freelance on Mon, 13 Jan 2020 18:23:50 -0800
Query documents with array size greater than 1
I have a MongoDB set. The file format is as follows:
{
"_id" : ObjectId("4e8ae86d08101908e1000001"),
"name" : ["Name"],
"zipcode" : ["2223"]
}
{
"_id" : ObjectId("4e8ae86d08101908e1000002"),
"name" : ["Another ", "Name"],
"zipcode" : ["2224"]
}
I can now get documents that match a specific array size:
db.accommodations.find( ...
Posted by kashmirekat on Sun, 05 Jan 2020 02:29:28 -0800
Getting and using the "Ou id" in mongodb
1, query parameters in git form
For git path parameters, click a link to get / lydetail?id in the URL bar, and then you can receive this id in the index.js file. The route name is / lydetail
<a href="/lydetail?id=<%-item._id %>"><%-item.title %></a>
<table class="table">
<tr>< ...
Posted by JovanLo on Tue, 31 Dec 2019 23:26:09 -0800