1.后端项目
在码云上搜索“人人开源”项目,找到renren-fast和renren-fast-vue两个项目![](https://img.haomeiwen.com/i9524278/4f384e0707481d60.png)
![](https://img.haomeiwen.com/i9524278/73e3fb3731f85983.png)
![](https://img.haomeiwen.com/i9524278/10135b9f027d4fef.png)
![](https://img.haomeiwen.com/i9524278/99a31b73c37f81b8.png)
![](https://img.haomeiwen.com/i9524278/234f15420cbe049a.png)
![](https://img.haomeiwen.com/i9524278/45bc0349767d58eb.png)
![](https://img.haomeiwen.com/i9524278/005d579af377e190.png)
修改renren-fast的配置文件,把数据库地址和密码改为我们自己数据库的地址和密码。
![](https://img.haomeiwen.com/i9524278/1d1967b87876f18f.png)
![](https://img.haomeiwen.com/i9524278/6ec84724b69f36cc.png)
2.前端项目
在进行前端项目开发前,需要先装备前端开发环境,安装nodejs,具体的安装教程可自行百度。![](https://img.haomeiwen.com/i9524278/b32cf54daef55e7f.png)
使用VScode打开我们的前端项目renren-fast,然后在终端输入npm install 下载依赖
npm install
如果gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable报错,可参考点击安装node-sass
npm install node-sass --save-dev
![](https://img.haomeiwen.com/i9524278/a8ce513089cf12e2.png)
下载完依赖后,运行项目
npm run dev
![](https://img.haomeiwen.com/i9524278/04cb6275fe939d86.png)
然后在浏览器中输入:http://localhost:9528/ 即可访问我们的项目(一定要把后端项目先运行起来)。
![](https://img.haomeiwen.com/i9524278/55d794322e3a664a.png)
至此,前后端项目搭建完毕。
网友评论