first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
module.exports = {
url: 'www.baidu.com'
}

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h2>你好</h2>
</body>
</html>

View File

@@ -0,0 +1,13 @@
const http = require('http');
const fs = require('fs');
// request 请求
// response 响应
const server = http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/html' });
var data = fs.readFileSync("./index.html", { encoding: 'utf-8' })
res.end(data);
});
server.listen(80);

View File

@@ -0,0 +1,69 @@
{
"name": "2022-04-07",
"version": "1.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "2022-04-07",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@types/node": "^17.0.23",
"axios": "^0.26.1"
}
},
"node_modules/@types/node": {
"version": "17.0.23",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz",
"integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw=="
},
"node_modules/axios": {
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
"integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
"dependencies": {
"follow-redirects": "^1.14.8"
}
},
"node_modules/follow-redirects": {
"version": "1.14.9",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
}
},
"dependencies": {
"@types/node": {
"version": "17.0.23",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz",
"integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw=="
},
"axios": {
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
"integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
"requires": {
"follow-redirects": "^1.14.8"
}
},
"follow-redirects": {
"version": "1.14.9",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w=="
}
}
}

View File

@@ -0,0 +1,16 @@
{
"name": "2022-04-07",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@types/node": "^17.0.23",
"axios": "^0.26.1"
}
}

View File

@@ -0,0 +1,55 @@
Node.js
其实js但是 它是运行在服务器上的js的运行环境所以nodejs其实也是后端编程语言。
nodejs
c++ + v8(js运行环境)
deno
前端
1html+css
2: jquery
|
Node.js 分工 前后端分离
|
3: vue react an....
啥玩意?
为什么学?
nodejs
package.json
npm init 初始化一个nodejs项目
-y
npm run 命令名称(在 package.json 的 scripts 里面定义的)
npm 包(依赖)(插件)管理工具
npm i 下载项目依赖
npm installi 插件名字 阶段参数
npm i 插件名字 阶段参数
阶段:
开发阶段 --save-dev -D
正式阶段 --save -S
全局安装 -g
npm uninstall 插件名 卸载删除插件
// hosts 文件
www.baidu.com 127.0.0.1
abc.com 127.0.0.1