创建Node.js Express 项目
最后更新于:2022-04-01 03:32:20
打开WebStorm 选择创建新项目
![2015-08-08/55c5ac33a959a](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2015-08-08_55c5ac33a959a.png)
点击Create 后,会使用Express-generator 自动创建项目.
创建过程中会出现选择Node.js 源码压缩包
![2015-08-08/55c5adbfdcc0e](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2015-08-08_55c5adbfdcc0e.png)
网络会下载比较慢。我已经下载好了存放与 \\\192.168.1.218\tools
![2015-08-08/55c5ae2306ddf](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2015-08-08_55c5ae2306ddf.png)
复制 `node-v0.12.7.tar.gz` 到本地硬盘,Nodejs安装目录中
![2015-08-08/55c5ae93913d2](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2015-08-08_55c5ae93913d2.png)
下面开始设置
![2015-08-08/55c5ae5d5bf2f](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2015-08-08_55c5ae5d5bf2f.png)
![2015-08-08/55c5ae6ce6572](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2015-08-08_55c5ae6ce6572.png)
![2015-08-08/55c5aead69d2b](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2015-08-08_55c5aead69d2b.png)
![2015-08-08/55c5af14c1c6b](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2015-08-08_55c5af14c1c6b.png)
可以看见 项目已经创建成功,并且帮我们自动安装了相关 `modules `
下面就是项目的目录结构。
![2015-08-08/55c5b030b78d8](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2015-08-08_55c5b030b78d8.png)
启动项目 点击 `启动按钮`。
![2015-08-08/55c5b057cfa10](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2015-08-08_55c5b057cfa10.png)
控制台提示 项目运行成功端口3000
![2015-08-08/55c5b0889bdd0](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2015-08-08_55c5b0889bdd0.png)
打开浏览器访问 http://127.0.0.1:3000/
![2015-08-08/55c5b0eabfdc4](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/2015-08-08_55c5b0eabfdc4.png)
到这里我们的Express 项目就创建成功了!