🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# Mediasoup-Demo安装 ## 1、更新升级 ``` sudo apt-get update && apt-get upgrade -y ``` ``` sudo apt-get install gcc g++ make -y ``` ## 2、安装`node` ``` sudo apt-get install curl -y ``` ``` curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - ``` ``` sudo apt-get install nodejs -y ``` ``` sudo npm install -g cnpm --registry=https://registry.npm.taobao.org sudo npm config set registry https://registry.npm.taobao.org ``` ## 3、安装项目 ``` cd ~ ``` ``` git clone https://gitee.com/cnzxo/mediasoup-demo.git ``` ``` cd ~/mediasoup-demo/server ``` ``` mkdir certs ``` ``` cd certs ``` ``` openssl genrsa > privkey.pem ``` ``` openssl req -new -x509 -key privkey.pem > fullchain.pem ``` ``` cd ~/mediasoup-demo/server ``` ``` sudo cnpm install ``` ``` cd ~/mediasoup-demo/app ``` ``` sudo cnpm install ``` ## 4、运行项目 > 启动服务器:打开`server`文件夹 ``` npm start ``` > 启动客户端:打开`app`文件夹 ``` npm start ```