Node. Operating MySQL in JS project

catalogue 1, Installing and configuring mysql module 1. Steps to operate mysql in a project 2. Install and configure mysql module (1) Install mysql module (2) Configure mysql module (3) Test whether the mysql module works normally 2, Using MySQL module to operate MySQL database 1. Query data 2. Insert data 3. Update data 4. Delete ...

Posted by QuizToon on Thu, 13 Jan 2022 13:02:02 +0100

Node.js --- using Express write interface

1, Create basic server As follows: //Import Express module const express = require('express') //Create a server instance of Express const app = express() //Call app Listen method, specify the port number and start the server app.listen(80,function(){ console.log('Express server running at http://127.0.0.01') 2, Create API routing mod ...

Posted by bftwofreak on Wed, 12 Jan 2022 11:10:03 +0100

Create VS Code extension

VS Code provides powerful extension functions. We can develop plug-ins to implement our own business model editor. Here, let's quickly introduce the process of creating, developing and publishing plug-ins. Create plug-in development template First, confirm that node. Is installed in the system JS, and you can use the npm installation package. T ...

Posted by Tomcat13 on Wed, 12 Jan 2022 05:16:13 +0100

node.js+mysql learning notes

I'm almost finished. I've sorted out some nodes JS + MySQL notes. fs module fs common methods const fs = require('fs') // read file // fs.readFile(path[, options], callback) // options: indicates the encoding format to read the file (optional). If not selected, it is output as a Buffer object // Callback: after reading the file, get the r ...

Posted by FrOzeN on Wed, 12 Jan 2022 03:15:32 +0100

In the browser, run Vite!

First official account Front end from advanced to admission , welcome to pay attention. Hello, I'm ssh. I saw Francois Valdy announce that he made it when I was pushing surfing the other day browser-vite , Vite was successfully run in the browser. This aroused my interest. How to run a Vite heavily dependent on node on the browser? Next, let ...

Posted by bmyster on Mon, 10 Jan 2022 08:22:50 +0100

You won't be serverless in 2022? Look at this nanny tutorial (middle)

This article mainly introduces the practice of serverless in applet cloud developmentTraditional development mode of appletSometimes there is more time for the joint commissioning of front and rear stations. When the project goes online, more operation and maintenance issues need to be considered, such as buying domain names and serversCloud de ...

Posted by KirstyBurgoine on Sat, 08 Jan 2022 02:20:05 +0100

You won't be serverless in 2022? Look at this nanny tutorial

This article mainly introduces the practice of serverless in applet cloud developmentTraditional development mode of appletSometimes there is more time for the joint commissioning of front and rear stations. When the project goes online, more operation and maintenance issues need to be considered, such as buying domain names and serversCloud de ...

Posted by mattm1712 on Fri, 07 Jan 2022 08:35:09 +0100

Use webpack to build your own npm package

Introduction: I have recently done several projects. I want to extract the public parts and set them as npm packages separately so that other projects can be used and save the trouble of repeated writing. After looking for a long time on the Internet, I finally found a way to package my own package to npm and support the use of browser and node ...

Posted by moboter on Thu, 06 Jan 2022 10:10:09 +0100

nodejs implements multi process

The main process of nodejs is single threaded, but it has a multi-threaded processing scheme (more ready, multi process scheme), that is, the main process starts different sub processes, the main process receives all requests, and then distributes them to other different nodejs sub processes for processing.It generally has two implementations:T ...

Posted by orbitalnets on Wed, 05 Jan 2022 21:36:05 +0100

node.js realizes method synchronization through Async

Node. Asynchrony of JS:First, let's take a look at node JS asynchronous mechanism:setTimeout(function () { console.log('event A occurs') }, 3000) console.log('event B occurs');As a Java developer, the expected execution result of this code is:sleep 3 secondsevent A occursevent B occursHowever, the actual implementation results are as follow ...

Posted by jovanross on Wed, 05 Jan 2022 19:26:34 +0100