【发布时间】:2023-02-05 18:52:18
【问题描述】:
在此链接中,向下滚动显示Run your own server on Gitpod! 的页面。
因此,我单击按钮并登录 Gitpod 后,它会将我发送到网址为 https://xxxxxxxxxxxxxx.ws-eu74.gitpod.io/ 的页面。看起来有 PeerJS Server 代码的克隆。
有谁知道如何让它工作?
- 页面底部哪里写着
gitpod /workspace/peerjs-server (master) $,我要输入代码peerjs --port 9000 --key peerjs --path /myapp吗?这里面的key是什么?[注意:当我在页面的命令行中键入它时,它显示为
peerjs not found。当我先cd bin时,它甚至会这样做。]-
这会永久运行吗?或者当我退出 Github 时 PeerJS 服务器会结束吗?
-
这是免费的还是付费的?
4 我需要在代码中输入什么:
<script> const peer = new Peer('someid', {host: 'localhost', port: 9000, path: '/myapp' }); </script>[编辑:我在终端中尝试了
npm install peer -g,这似乎工作正常。然而,当我输入peerjs --port 9000 --key peerjs --path /myapp行时,它只是说Error: Error: listen EAFNOSUPPORT: address family not supported :::9000并且冻结了。] -
【问题讨论】: