Front and back end identity authentication

catalogue 1Web development mode 2 identity authentication + session 3jwt 1Web development mode At present, there are two mainstream Web development modes The traditional Web development mode based on server rendering and the new Web development mode based on the separation of front and back ends. Based on the server side: the HTML pa ...

Posted by el-sid on Sun, 02 Jan 2022 23:10:29 +0100

Simple use of node ORM serialize

What is ORM? ORM (Object Relational Mapping) is a technology to solve the mismatch between object-oriented and relational databases. By describing the metadata mapped between objects and databases, the objects in the program are automatically persisted to the relational database. Its function is to make a mapping between relational database an ...

Posted by Decipher on Sat, 01 Jan 2022 21:04:11 +0100

Hand-on instructions for writing CLIS using nodejs (command line)

Why insist on writing? Writing is the process of seeking answers. In front-end development, we often use cli tools such as webpack-cli, Vue-cli, create-react-app. In actual business development, we also have a lot of CLI requirements to help us achieve the rapid creation of new projects or modules. Let's get started! Let's demonst ...

Posted by anindya23 on Sat, 01 Jan 2022 13:50:47 +0100

The operation state of nodejs maintains technical cookie s and session s

​catalogue3.1,cookie3.2,session Because http is a stateless protocol, the browser request server is stateless. Stateless: when a user requests, the browser and server cannot know what the user has done before. Each request is a new request. Stateless reason: the browser communicates with the server using socket. After the server returns the ...

Posted by poring on Mon, 27 Dec 2021 03:03:30 +0100

Node.js network programming to realize the creation of HTTP, GET and POST

HTTP server and client (important) HTTP Foundation HTTP protocol: hypertext transmission control protocol, a general, stateless and data independent protocol (working at the application layer) The process of interaction between server and client: Establish TCP connection between client and server (HTTP protocol is implemented based ...

Posted by lhcpr on Sat, 25 Dec 2021 05:11:17 +0100

Use bcryptjs to encrypt the password

1, ForewordWhen a user registers, if the password is not encrypted, it is directly stored in plaintext in the database. Once the database is leaked, it is a very serious problem for the user and the company.2, Use js-md5 package to encrypt1. md5 introductionMD5 message digest algorithm (English: MD5 message digest algorithm), a widely used cryp ...

Posted by kaveman50 on Fri, 24 Dec 2021 15:04:40 +0100

Node.js SQL database operation (ORM framework, serialize module and case display)

ORM framework ORM Object Relational Mapping (Object Relational Mapping) is a technology to solve the mismatch between object-oriented and relational databases. Through the metadata describing the mapping between objects and databases, the objects in the program are automatically persisted to the relational database. Its function is to m ...

Posted by zoreli on Mon, 20 Dec 2021 03:10:43 +0100

Introduction to JavaScript -- process control statement & A case of classic algorithm

Process control: Branch (condition), loop 1. Branch statement 1.1 conditional statements if statement The statement executes code only when the specified condition is true if (condition) { When the condition is true Code executed when } if... else statement Use the if... else statement to execute code when the condition is true and ...

Posted by whizzkid-000 on Sun, 19 Dec 2021 16:36:26 +0100

React+Redux+Ant Design+TypeScript e-commerce practice - server application 06 Order Management api and other APIs

Create order Schema // models\order.js const mongoose = require('mongoose') const Product = require('./product') const Category = require('./category') // Create snapshot type // Clone product Schema const snapshotProductSchema = Product.schema.clone() // Clone classification Schema const snapshopCategorySchema = Category.schema.clone() // De ...

Posted by Lee-Bartlett on Sat, 18 Dec 2021 19:51:06 +0100

Long text in thousands of words! Take you from getting started to mastering Git

Long text in thousands of words! Take you from getting started to mastering Git Catalog: Preface Introduction to Git pragmatism Deep Exploration summary Preface Git is a development tool that programmers can learn and work with. Share a summary of common Git commands with you today. Introduction to Git Git is a distributed version control sys ...

Posted by private_guy on Sat, 18 Dec 2021 15:29:36 +0100