Install grunt by first installing npm. npm is distributed as part of nodejs.
sudo apt-get install nodejs
sudo npm install -g npm
On Ubuntu 14.04 the default packages installs /usr/bin/nodejs but the /usr/bin/node executable is required for grunt. This is installed on some Ubuntu package sets; if it is missing, you can add this by installing the nodejs-legacypackage,
sudo apt-get install nodejs-legacy
It is easiest to install a shared version of grunt-cli from npm using the -g flag. This will allow you access the gruntcommand from /usr/local/bin. More information can be found on gruntjs Getting Started.
sudo npm -g install grunt-cli Omitting the -g flag will install grunt-cli to the current directory under the node_modules directory.
Finally, you will want to install grunt and required grunt dependencies. This can be done from any directory under your checkout of the webrtc/apprtc repository.
npm install On Ubuntu, you will also need to install the webtest package:
制作证书
➜ apprtc git:(restapi) ✗ openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 99999 -nodes
Generating a 2048 bit RSA private key
..............+++
....................................................+++
writing new private key to 'key.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:cn
State or Province Name (full name) [Some-State]:cn
Locality Name (eg, city) []:cn
Organization Name (eg, company) [Internet Widgits Pty Ltd]:cn
Organizational Unit Name (eg, section) []:cn
Common Name (e.g. server FQDN or YOUR name) []:cn
Email Address []:cn
WSS_HOST_PORT_PAIRS = [ins[WSS_INSTANCE_HOST_KEY] for ins in WSS_INSTANCES]
diff --git a/src/collider/collidermain/main.go b/src/collider/collidermain/main.go
index a499ada..5e164dd 100644
--- a/src/collider/collidermain/main.go
+++ b/src/collider/collidermain/main.go
@@ -6,7 +6,7 @@
package main