Article directory Preface 1. Install Node.js environment 2. Create node.js service 3. Access node.js service 4.Intranet penetration 4.1 Install and configure cpolar intranet penetration 4.2 Create tunnel mapping local port 5. Fixed public network address Before I start the text, I would like to recommend a website to you. A few days ago, I discovered […]
Tag: ejs
Nodejs__code__streamline__Ajax interaction
Introduction: Full name Ajax (Asynchronous Javascript And XML) Function 1. Update content without refreshing the page 2. A method of communication between the browser and the server Commonly used parameters: XMLHttpRequest A constructor used to implement asynchronous communication between the browser and the server Example: let xhr=new XMLHttpRequest() readyState Represents the status of XMLHttpRequest 0 […]
threejs(7)-Proficient in particle effects
1. First introduction to Points and point materials //Set point material const pointsMaterial = new THREE.PointsMaterial(); import * as THREE from “three”; //Import track controller import {<!– –> OrbitControls } from “three/examples/jsm/controls/OrbitControls”; //Import animation library import gsap from “gsap”; //Import dat.gui import * as dat from “dat.gui”; // Goal: get to know points const gui […]
[Case Combat] NodeJS+Vue3+MySQL implements list query function
This article brings you a list query function and a comprehensive case study from front-end to back-end. Use vue3 as front-end development and nodejs as back-end development. First, let’s take a look at the completed page effect. Click paging to switch to the previous page and next page. The search box allows for fuzzy queries. […]
NodeJS callback hell and Promise optimization
There are many asynchronous APIs in NodeJS, such as the common readFile method of the fs module. Although there is a synchronous version of readFileSync, its performance is definitely not as good as the former. So let’s start with the asynchronous version of readFile: const fs = require(‘fs’); fs.readFile(‘./a.txt’, ‘utf-8’, function(error, data) { if (!error) […]
Why should vue front-end projects use Nodejs?
1. Traditional JavaScript Traditional js runs on the browser, because the browser kernel is divided into two parts: Rendering engine-renders HTML and CSS, JavaScript engine-responsible for running JavaScript With the development of technology, the JavaScript engine used by Chrome is V8, which is very fast and has good performance. At the same time, Node.js, developed […]
NodeJS crawls design pictures on Ink Knife
Background The designer shared a prototype of the ink knife, but it was given read-only permission and the materials could not be downloaded. During development, I wanted to download an animated picture inside, and found the image address in the page structure through the browser’s F12 tool. However, after direct access by the browser, it […]
Implement multi-part upload, resume upload, and instant upload (JS+NodeJS) (TypeScript)
1. Introduction and effects Uploading files is a very common operation, but when the file is large, the upload will take a very long time, and the upload operation will be uncertain. If the connection is accidentally disconnected, the file It will need to be uploaded again, resulting in wasting time and network resources. Therefore, […]
HarmonyOS development: NodeJs script implements component-based dynamic switching
Foreword In the last article, we used NodeJs script to complete the componentized operation of the HarmonyOS project. However, since the script was developed based on the 4.0.0.400 version of DevEco Studio, there may be some differences in the modification of the configuration file. So what should we do if we encounter this situation? One […]
nodejs’s js calls c++ and c++ calls libuv process
Registration and use of c++ modules We know that nodejs is composed of js, c++, and c. Today we take a look at how they divide labor and cooperate. This article takes the net module as an example for analysis. We can use the net module in the following ways. const net = require(‘net’); net […]