Several ways to process images in nodejs, using sharp, jimp, and webconvert

Use sharp Sharp is a fast and efficient Node.js image processing library that supports image format conversion, size adjustment, compression, cropping, rotation, watermarking and other functions. Here are the basic steps for using the Sharp library: 1. Install Sharp library To install the Sharp library, you can use the npm command: npm install sharp 2. […]

Several ways to implement real-time communication in nodejs

Several ways to implement real-time communication in nodejs In today’s world, real-time communication is crucial. Whether it’s a chat app or live sports updates, real-time communication is necessary to keep users active. Node.js is a popular tool for developing real-time applications because of its speed, scalability, and reliability. In this article, we’ll explore why Node.js […]

Using npm package to implement JS code obfuscation and encryption in NodeJS

Use npm package to implement JS code obfuscation and encryption in NodeJS In the front-end and back-end JS development process, JS code protection (JS code obfuscation and encryption) is a very important part. JShaman is a cloud-based code protection SaaS platform that can obfuscate, encrypt, compress, and other operations on JS code to enhance the […]

nodejs+wasm+rust debug and performance analysis

Article directory background The profile that comes with the v8 engine Linux perf collection Performance analysis of wasm third-party library Compile the debug version of wasm rust program debugging Anomaly model normal model in conclusion optimization Reference Node uses flame graph to optimize CPU explosion – Nuggets [Node.js丨Theme Week] Understanding perf and flame graph-Tencent Cloud […]

NodeJS VM sandbox escape

Article directory basic concept Node executes string as code Method 1 eval Method 2: new Function Nodejs scope vm sandbox escape Some other situations of vm sandbox escape Example Basic concepts What is a sandbox (sandbox)? When we run some programs that may cause harm, we cannot test directly on the real environment of the […]

Behind npm init @vitejs/app is just the tip of the npm CLI iceberg

Click the blue word “Front-end Sinan” above to follow me Your attention means a lot Original@frontendsinan The final words are at the front. I sometimes come to the conclusion: It turns out that those commands or tools that I don’t commonly use exist to solve the problems encountered by the big guys! We deal with […]

nipplejs.js joystick control panel

NippleJs is a js library for virtual joysticks. It is designed to provide interfaces for touch-enabled devices. It is often used in games and apps or web pages that can operate hardware devices. In a 3D scene built using Threejs, use nippleJs to control character walking and camera following functions. The effect is as shown […]

threejs (1) Create a cube

Introduction npm install three import * as THREE from ‘three’; const scene = new THREE.Scene(); Or use bootCDN to copy the corresponding version connection <script src=”//i2.wp.com/cdn.bootcdn.net/ajax/libs/three.js/0.156.1/three.js”></script> Basic knowledge Scene, camera, renderer Create a scene through THREE.Scene: a container for the 3D world. All objects must be placed in this scene, including the background, etc. Geometry: […]

nodejs — Http module

Shang Silicon Valley 44-66 1. Create an Http server (1) http://127.0.0.1 always represents the address of this machine, whether it is a mobile terminal or a client; (2) The execution time of the callback function in createServer (callback function) is executed when the browser sends a request; request is the request object, and response is […]