Web development framework - Express (installation and use, static hosting, routing processing, use of Middleware)

Express - based on node JS platform web application development framework - Express Chinese document | express Chinese networkhttps://www.expressjs.com.cn/ Express is based on Node The web development framework developed by JS is a Node JS module; Since it is based on Node JS, the premise of using express is that the computer must have installe ...

Posted by weemee500 on Tue, 15 Feb 2022 12:13:25 +0100

Node.js (II. Request response principle and HTTP protocol)

1. Server side basic concepts 1.1 IP address Unique identification of the device in the Internet. IP is the abbreviation of Internet Protocol Address, which represents the Internet Protocol Address. 1.2 domain name Because the IP address is difficult to remember, the concept of domain name came into being. The so-called domain name is t ...

Posted by balkar on Mon, 14 Feb 2022 17:02:16 +0100

Explain ESM module and CommonJS module in simple terms

Ruan Yifeng Getting started with ES6 There are some significant differences between ES6 module and CommonJS module mentioned in:The CommonJS module outputs a copy of the value, while the ES6 module outputs a reference to the value.CommonJS module is loaded at run time, and ES6 module is the output interface at compile time.If you read the diffe ...

Posted by Phate on Sun, 13 Feb 2022 02:43:48 +0100

Reduce Webpack packaging time

1.1 optimize Loader For the Loader, Babel must bear the brunt of affecting the packaging efficiency. Because Babel will convert the code into string to generate AST, then continue to transform the AST, and finally generate new code. The larger the project is, the more code is converted, and the lower the efficiency is. Of course, we have a ...

Posted by kycan on Fri, 11 Feb 2022 11:51:46 +0100

Construction practice of front-end drawing bed (back-end)

Project backgroundIn addition to using the common third-party drawing bed, we can also build a private drawing bed to provide front-end basic services for the team. This paper aims to review and summarize the implementation scheme of the back-end part of the self built drawing bed, hoping to give some reference and schemes to students with simi ...

Posted by TGixer on Thu, 10 Feb 2022 19:20:53 +0100

The puppeter of nodejs realizes the code scanning login of JD automation function

Recently, I want to realize a function of JD scanning code, logging in, automatic ordering and automatic rush purchase (ps: realize JD automation function), !!! This project is purely for learning and commercial use is prohibited Let me share with you how I can find the corresponding interface and parameters step by step by analyzing JD's web ...

Posted by laide234 on Thu, 10 Feb 2022 09:03:59 +0100

Exception and error handling in nodejs

Exception handling is a place that must be paid attention to in program operation. When an exception occurs, it should be paid attention to at the first time and solved quickly. Most programmers dare not guarantee that their code percentage is correct, so they should prevent and deal with exceptions in advance when writing code, try to give use ...

Posted by depojones on Wed, 09 Feb 2022 14:29:16 +0100

Using Libuv thread pool through N-API

Node.js is not suitable for processing time-consuming operations, which has always been a problem. Therefore, node JS provides three solutions. 1 subprocess 2 sub thread 3 Libuv thread pool The first two are more efficient because we only need to write js. But there are also some disadvantages 1. Cost of executing js 2. Although Libuv threa ...

Posted by BMurtagh on Wed, 02 Feb 2022 11:43:04 +0100

XSS Network Security Learning and Practice

XSS Cross site scripting (XSS) is a kind of security vulnerability attack of website application and a kind of code injection. It allows malicious users to inject code into the web page, which will affect other users when they watch the web page. Such attacks usually involve HTML and client scripting language Attack mode Attack the website b ...

Posted by JCBarry on Tue, 01 Feb 2022 17:13:52 +0100

Dependency injection

Introduction Trying to use Scalable Frontend 1 — Architecture Fundamentals When it comes to Dependency Injection, I feel a little unclear. I have found some information to understand it better. It is summarized in this translation record. OriginMy GitHub What is dependency injection In software engineering, dependency injection is a technol ...

Posted by markepic on Mon, 31 Jan 2022 19:22:46 +0100