I developed a software based on egg JS back-end scaffold
background
Previously based on egg JS has developed several projects. It is found that each project has functions such as configuration file, database connection operation, data model definition, wechat login authorization processing, etc. when making A new project, it will always copy the previous project to delete and modify. Sometimes A pra ...
Added by clairian on Fri, 11 Feb 2022 06:23:01 +0200
01,node. JS FS is a file system module
1. What is a fs file system module
[explanation]: the fs file system module is node JS is an official module for operating files. It provides a series of methods and attributes to meet the basic needs of users for file operation.
[basic usage]:
Import directly after installing node
const fs = require ('fs')
2. Reads the contents of the sp ...
Added by davidx714 on Fri, 11 Feb 2022 05:50:13 +0200
Vue modifier
Vue modifier
The modifier is a half angle period " ”Indicates the special suffix used to indicate that an instruction should be bound in a special way
<form v-on:submit.prevent="onSubmit">...</form>
The. prevent modifier tells the v-on instruction to call event for the triggered event preventDefault()
Event modifie ...
Added by Lexi on Thu, 10 Feb 2022 18:17:13 +0200
Dark horse node JS start
Node.js start
Node.js is a server language The language of the server is different from that of the front-end. The front-end only has H5,CSS,JS and other languages based on it, but there are many languages on the server that can realize the most basic functions such as H5. They are parallel and independent, such as Java, PHP, python, rub ...
Added by silent on Wed, 09 Feb 2022 19:00:49 +0200
express framework Foundation
Installation and use
// Import express module
const express = require('express');
// Register express module
const app = express();
//Mount routing
app.get('/',(req,res)=>{
res.send(`<h1>home page</h1>`);
})
app.get('/user',(req,res)=>{
//req request object get request parameters
res.send(req.query);
})
app.g ...
Added by Az_Critter on Tue, 08 Feb 2022 01:13:16 +0200
build_ Construction process of process webpack
How to build webpack?
1, Operation process
The running process of webpack is a serial process, and its workflow is to connect various plug-ins in series
Events will be broadcast during operation. The plug-in only needs to listen to the events it cares about, and can join this webpack mechanism to change the operation of webpack and make th ...
Added by wayang_mbeling on Sun, 06 Feb 2022 20:55:55 +0200
Nodejs play process
First of all, we should know that node is executed by single thread, but today's computer has developed to multi-core CPU. Therefore, it has become an important problem to solve the problem of node using multi-core CPU server.
I Multi process architecture
Analysis: in master JS folder, through child_process to copy sub processes, and os to ac ...
Added by Rianna on Fri, 04 Feb 2022 05:36:00 +0200
Vue 3 custom instruction development
What is directive Both Angular and Vue have the concept of Directive. We usually translate Directive into "instruction".
In computer technology, an instruction is a single CPU operation defined by the instruction set architecture. In a broader sense, "instruction" can be a representation of any element of an executable prog ...
Added by MadRhino on Thu, 03 Feb 2022 03:50:23 +0200
nwjs version update node WebKit updater scheme
Remember to follow these steps strictly
1. Execute the command in the project engineering directory
npm install node-webkit-updater
2. Edit your startup html file, such as app / index html file, add the following code
(1) Update script code
Note that the following code is prone to problems. Due to the problem of window permission, ...
Added by agent007 on Wed, 02 Feb 2022 02:34:19 +0200
NodeJs built in module
@
System module fs -- file operation
f(file)s(system): file operating system
fs file system | node JS API document (nodejs.cn)
require('fs')
Want to use node The fs system module in the JS system module first needs to introduce fs into the current module.
const fs = require('fs');
fs.readFile()
fs.readFile(path[, options], callback);
Functi ...
Added by FadeToLife on Wed, 02 Feb 2022 00:58:46 +0200