Files
ClassContent/历届学生/18课程/class18/课程/2020-11-03/笔记.txt
2024-09-27 02:06:13 +08:00

48 lines
1011 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

nodejs
nodejs是一个运行环境本质上就是jsnodejs 运行在服务器上的js
js :运行在客户端浏览器(v8)上的脚本语言
js : v8 + c++ nodejs运行在后端服务器上
nodejs
但是js是弱类型编程语言
nodejs 在前端大放光彩
js前端 : web网页pc移动端 桌面端,后端(nodejs)appandroidios操作系统
nodejs
npm 包(依赖)管理管理
npm install lbt 3.4.0
npm uninstall lbt
npm update lbt
node_modules
|-- lbt
npm init 在当前路径创建一个package.json 文件初始化nodejs项目
npm init -y 采取默认,不要问我直接创建文件
scripts
后端项目的运行命令都在这
npm run 命令的名字
npm install
简写npm i
npm i -g xxx 安装到全局,任何一个地方(项目)都可以使用
npm i --save 简写 -S xxx 安装到项目的正式阶段 (dependencies)
npm i --save-dev 简写 -D xxx 安装到项目的开发阶段 (devDependencies)