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 @@
你好

View File

@@ -0,0 +1,11 @@
const http = require('http');
const fs = require('fs');
// 创建本地服务器来从其接收数据
const server = http.createServer((req, res) => {
var html = fs.readFileSync("./index.html");
res.writeHead(200, { 'Content-Type': 'text/html; charset=UTF-8' });
res.end(html.toString());
});
server.listen(8000);

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h2>哈哈哈哈</h2>
</body>
</html>

View File

@@ -0,0 +1,8 @@
// const axios = require('axios').default;
// const a = require("./utils");
// a.a.test()
// console.log(require("./utils"));
const fs = require("fs");
fs.writeFileSync("./1.txt", "你好")

View File

@@ -0,0 +1,63 @@
{
"name": "2020-07-05",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"axios": {
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
"integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
"requires": {
"follow-redirects": "^1.14.9",
"form-data": "^4.0.0"
}
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
},
"follow-redirects": {
"version": "1.15.1",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
"integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA=="
},
"form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
},
"mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
},
"mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"requires": {
"mime-db": "1.52.0"
}
}
}
}

View File

@@ -0,0 +1,16 @@
{
"name": "2020-07-05",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node-dev index.js",
"serve": "node-dev http.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^0.27.2"
}
}

View File

@@ -0,0 +1,9 @@
class utils {
test() {
console.log(this);
console.log("hhaahhah");
}
}
module.exports = new utils()
// exports.a = new utils()

View File

@@ -0,0 +1,75 @@
Node.js 是什么?
fs
是一个js在服务器上的运行环境
v8
c++
能不能让js变成后端语言
Node.js
js 运行 靠 V8 引擎
前端开发三个阶段
1 HTML CSS table
2 html+css+jsjquery 操作dom
mvc mvc框架
nodejs 蓬勃发展
3 mvvm angular.js
react
vue
npm 全球最大的包(插件,依赖)管理工具
npm init 初始化一个 nodejs 项目 package.json
-y
npm run xxx 使用npm运行scripts中的命令
npm install简写 i 插件名称 参数
参数:
--save -S 将插件保存到上线阶段 dependencies
--save-dev -D 将插件保存到开发阶段 devDependencies
-g 将插件安装到操作系统全局
npm i
devDependencies 开发阶段的插件依赖
dependencies 上线阶段的插件依赖
cnpm 淘宝
npm uninstall 插件名
node_modules 存放你项目开发中所有下载下来的插件
package-lock.json
爬虫