搭建目的:测试信令服务器功能 第一步搭建房间服务器
(本文前半部分是走的弯路,一些错误示范 后半部分才是对的)
服务器的代码我们选用GoogleChrome的开源项目,该项目可以在Github找到:
https://github.com/GoogleChrome/webrtc
来自 <http://webrtc.org.cn/webrtc_server/>
该项目的一些示例可以在下面网址得到:
https://github.com/GoogleChrome/webrtc
来自 <http://webrtc.org.cn/webrtc_server/>
在我们自己的服务器中运行Google的房间服务器AppRTC需要依赖Google App Engine SDK for Python 和 Grunt.
来自 <http://webrtc.org.cn/webrtc_server/>
Grunt:
javaScript 世界的构建工具
先搭建房间服务器AppRTC
- 首先我们安装Grunt:
cheetah@localhost:~/$sudo apt-get install npm
cheetah@localhost:~/$sudo apt-get install nodejs-legacy
cheetah@localhost:~/$sudo npm -g install grunt-cli;
- 下载该项目的源码到某个目录:
cheetah@localhost:~/$cd ~;
cheetah@localhost:~/$git clone https://github.com/GoogleChrome/webrtc.git;
终端Shell切换当前工作目录到上一步的下载的项
- //目目录webrtc下,然后安装Grunt以及Grunt的依赖:
//cheetah@localhost:~/$ cd~;
//cheetah@localhost:~/$ gitclone https://github.com/GoogleChrome/webrtc.git;
- 运行AppRTC房间服务器之前我们需要Grunt编译一下该项目的js文件之类: