express custom middleware handles post requests

preface express's built-in urlencoded () has compatibility problems. We use node's querystring to encapsulate a middleware for processing post requests for ease of use. 1, Built in middleware (common) Implementation code and notes const express = require('express'); const app = express(); // Built in middleware common // express.st ...

Added by accident on Sat, 15 Jan 2022 20:54:46 +0200

RabbitMQ has six modes, message response, persistence and message distribution

1: HelloWorld simple mode 2: Work Queues work mode 3: Publish/SubScribe mode 4: Routing mode 5: Topics topic mode 6: Publish Comfirm release confirmation mode Code demonstration 1: HelloWorld simple mode (switches use the default -- binding RoutingKey -- queue) Consumers actively get messages through listeners Create maven project and add ...

Added by walshd on Tue, 11 Jan 2022 20:03:21 +0200

GoFrame framework: fast implementation of service end flow limiting Middleware

introduceThrough a complete example, in gogf/gf Implement [current limiting] Middleware in the framework.We will use rk-boot To start gogf/gf Microservices.rk-boot Is a framework that can start a variety of Web services through YAML. Please refer to the last chapter of this article for details rk-boot Details.Please visit the following address ...

Added by trancemission on Thu, 06 Jan 2022 12:48:55 +0200

SpringCloud service gateway quickly landed in practice

Application of service gateway in microservice Foreign service challenges The application system of microservice architecture is very large. The basic components that need to be deployed independently include registration center, configuration center and service bus, Turbine exception aggregation and monitoring disk, call chain tracki ...

Added by pollysal on Wed, 05 Jan 2022 08:19:15 +0200

rabbitmq advanced features

3.RabbitMQ cluster construction Absrtact: the cluster scheme of message queue will be adopted in practical production applications. If RabbitMQ is selected, it is necessary to understand its cluster scheme principle Generally speaking, if it is only to learn RabbitMQ or verify the correctness of business engineering, it is OK to use its singl ...

Added by jayR on Tue, 04 Jan 2022 03:57:04 +0200

Django class view and Middleware

Class view 1. Class view import The view defined by function is called function view, which is easy to understand. However, when the path corresponding to a view provides support for many different HTTP request modes, you need to write different business logic in a function, and the code readability and reusability are poor. def register(req ...

Added by yashvant on Mon, 03 Jan 2022 14:01:00 +0200

GoFrame framework: add Prometheus monitoring Middleware

introduceThrough a complete example, Prometheus monitoring middleware is added to the micro service based on GoFrame framework.What is Prometheus monitoring interceptor / Middleware?The monitoring interceptor will record Prometheus Metrics for each API request.We will use rk-boot To start the micro service of GoFrame framework.Please visit the ...

Added by ltoto on Thu, 30 Dec 2021 21:00:37 +0200

rocketMq learning and Practice

rocketMq learning and Practice (I) Installation configuration download Binary download address: http://rocketmq.apache.org/release_notes/release-notes-4.8.0/ Docker pull address: docker pull foxiswho / rocketmq: server-4.3 two install Configure environment variables Find the installation package, start nameserver, enter the bin di ...

Added by snaack on Thu, 30 Dec 2021 11:27:01 +0200

Python 10.4.1 Django framework: T.Django template

catalogue 1, Django uses its own template 1. Configuration 2. Define template 3. Template rendering 4. Template syntax 4.1 template variables 4.2 template statement 4.3 notes 5. Filter 5. Template inheritance 2, Django uses the jinja2 template 1. jinja2 introduction 2. Install jinja2 module 3. Django configuration jinja2 4. Most ...

Added by desithugg on Wed, 29 Dec 2021 23:51:34 +0200

Gin security chapter-3: fast implementation of CSRF verification

introduceThis article describes how to rk-boot Implement the CSRF verification logic of the server.What is CSRF?Cross Site Request Forgery (English: Cross Site Request Forgery), also known as one click attack or session riding, usually abbreviated as CSRF or XSRF, is an attack method to coerce users to perform unintentional operations on the cu ...

Added by irwa82 on Sun, 26 Dec 2021 15:10:41 +0200