[C + +] - Introduction to mongoose Network Library
Mongoose is a C language network library, which implements event driven non blocking APIs for TCP, UDP, HTTP, WebSocket, CoAP and MQTT.
Mongoose Library
Mongoose is a famous embedded network programming library( https://github.com/cesanta/mongoose ); With only a small amount of static and runtime space, it realizes:
Ordinary TCP, ordina ...
Posted by iloveny on Thu, 03 Feb 2022 20:04:13 +0100
A comprehensive table of Vue module (2) creating tables
A comprehensive table of Vue module (2) creating tables
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 framework express mongodb: d ...
Posted by Dathremar on Sun, 05 Apr 2020 01:04:56 +0200
How to use mongodb database in node.js
This paper introduces the usage of mongodb database in node.js project. The related directory structure is the directory in the project. The code is not uploaded first, only the method is introduced.
Using mongodb for database
The installation method of mongodb server is to execute apt get install mongodb in ubuntu, a ...
Posted by Walker33 on Thu, 02 Apr 2020 11:33:27 +0200
Node Learning Notes 7 days Node.js Course Knowledge Compilation
Try to use Node.js to stumble and stumble in your work. Briefly comb Noejs (7 days) from now on, leaving out the following points of knowledge in the example section:
require and export
Export methods or variables from a file using the export or module.exports method in the target component
The difference is that export is not available when e ...
Posted by rmurdo on Thu, 26 Dec 2019 06:49:45 +0100
Node.js+Express+MongoDB database for web page registration and login
Implement web-based account registration and login through Node.js + Express + MongoDB
Project preparation:
1: Prepare the project page (index.html for the first page) (login.html for the login page) (register.html for the registration page)
2: Third-party templates needed to install Node.js
3: Design Path Design
4: Clear up functional require ...
Posted by widget on Mon, 16 Dec 2019 04:44:41 +0100
koa,express,node simplified connection to MongoDB
node, express and koa connect MongoDB in the same way. We use mongoose module to connect
Read this article about connecting to mysql: koa,express,node general method to connect MySQL
Here is just a brief list of the structure of connecting MongoDB. In fact, to really understand MongoDB, you need a lot of knowledge points, such as MongoDB data t ...
Posted by fotakis on Sat, 07 Dec 2019 11:17:58 +0100
Write a case of Koa + graphQL from zero
I saw the guidance of integrating GraphQL in the document of Nest.js, so I wrote a DEMO with Koa first, and then integrated with Nest.js.
Write out the database model first (this file exists before, and has not been changed. Change the file name to models.ts):
/**
* Created by w on 2018/4/13.
*/
const mongoose = require('mongoose');
mongoose ...
Posted by FloridaNutz on Sat, 02 Nov 2019 19:16:58 +0100
Introduction to mongoose modified at time automatic recording plug-in
Mongoose modified at is a mongoose plug-in that automatically updates the field change time and records it to the database, similar to the timestamps function of mongoose.
Usage scenarios
Let's consider a scenario. We have an article release and display requirement. The data model is as follows.
const schema = new mongoose.Schema({
// Article ...
Posted by amazinggrace1983 on Mon, 28 Oct 2019 03:04:52 +0100
Cookie and Session in Node
1,Cookie
HTTP is a stateless protocol. Example: Open the home page of a domain name, and then open other pages of the domain name, the server can not identify visitors. That is, the same browser visits the same website, each visit has nothing to do with it.
Cookie's principle is that after the client browser first accesses the server, the ser ...
Posted by slipperyfish on Mon, 26 Aug 2019 17:40:04 +0200
10 Minutes Implementation of Short Link Service (Node + Express + MongoDB)
Short links are more or less used by us. The so-called short links are to generate a shorter link according to the long original link url. Visiting short links can jump to the corresponding original link. This is good in: 1. url is more beautiful; 2. It is easy to save and disseminate; 3. Some websites have word limit in content publishing, sho ...
Posted by mansuang on Wed, 21 Aug 2019 11:16:42 +0200