Skip to content

Instantly share code, notes, and snippets.

@notedit
Last active January 23, 2018 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notedit/633600c212e66e6c35cd236b81e0ced0 to your computer and use it in GitHub Desktop.
Save notedit/633600c212e66e6c35cd236b81e0ced0 to your computer and use it in GitHub Desktop.
mediasoup demo run

Install Mediasoup

  • Clone my clone project, mediasoup demo need a little change to deploy
cd /root/
https://github.com/notedit/mediasoup-demo.git 
cd mediasoup-demo
  • Set up the server
cd server 
npm install 
cp config.example.js config.js 
  • Set up static file
cd ../app
npm install 
npm install -g gulp-cli
npm install -g pm2
gulp dist
  • Run mediasoup demo
cd ../server 
pm2 start server.js --name "mediasoup"

Install caddy

  • Download caddy
cd /root
wget https://github.com/mholt/caddy/releases/download/v0.10.10/caddy_v0.10.10_linux_amd64.tar.gz
tar -zxvf caddy_v0.10.10_linux_amd64.tar.gz
cp caddy /usr/sbin/
  • Generate ssl
cd /root/mediasoup-demo/server

# modify your Caddyfile config  change the domain name  
# and run caddy to generate the ssl file fist time  then  Ctrl+D exit 

caddy 

Install supervisor

  • Install supervisor
yum install supervisor 

cp /root/mediasoup-demo/server/caddy.ini  /etc/supervisord.d/

supervisord   #  run supervisord

now you should visite https://demo.xxxxx.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment