1.检查node是否已经安装
C:UsersSYJ>node -v
v10.15.0
2.检查npm是否已经安装
C:UsersSYJ>npm -v
6.14.11
3.创建并进入egg-example目录
C:UsersSYJ>mkdir egg-example && cd egg-example
4.快速初始化egg标准web工程
C:UsersSYJegg-example>npm init egg --type=simple
5.安装依赖
C:UsersSYJegg-example>npm install
6.启动web工程,控制台显示启动成功,端口7001
C:UsersSYJegg-example>npm run dev > example@1.0.0 dev C:UsersSYJegg-example > egg-bin dev [egg-ts-helper] create typingsappcontrollerindex.d.ts (7ms) [egg-ts-helper] create typingsconfigindex.d.ts (20ms) [egg-ts-helper] create typingsconfigplugin.d.ts (5ms) [egg-ts-helper] create typingsappindex.d.ts (1ms) 2021-02-25 10:49:01,034 INFO 4472 [master] node version v10.15.0 2021-02-25 10:49:01,036 INFO 4472 [master] egg version 2.29.3 2021-02-25 10:49:03,056 INFO 4472 [master] agent_worker#1:6652 started (2013ms) 2021-02-25 10:49:05,343 INFO 4472 [master] egg started on http://127.0.0.1:7001 (4305ms)
7.打开浏览器访问:http://127.0.0.1:7001/