【问题标题】:How do I Run My Own PeerJS Server on Gitpod如何在 Gitpod 上运行我自己的 PeerJS 服务器
【发布时间】:2023-02-05 18:52:18
【问题描述】:

在此链接中,向下滚动显示Run your own server on Gitpod! 的页面。

因此,我单击按钮并登录 Gitpod 后,它会将我发送到网址为 https://xxxxxxxxxxxxxx.ws-eu74.gitpod.io/ 的页面。看起来有 PeerJS Server 代码的克隆。

有谁知道如何让它工作?

  1. 页面底部哪里写着gitpod /workspace/peerjs-server (master) $,我要输入代码peerjs --port 9000 --key peerjs --path /myapp吗?这里面的key是什么?

    [注意:当我在页面的命令行中键入它时,它显示为peerjs not found。当我先cd bin 时,它甚至会这样做。]

    1. 这会永久运行吗?或者当我退出 Github 时 PeerJS 服务器会结束吗?

    2. 这是免费的还是付费的?

    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 并且冻结了。]

【问题讨论】:

    标签: github server peerjs


    【解决方案1】:

    您找到解决方案了吗?

    【讨论】:

    猜你喜欢
    • 2014-12-10
    • 1970-01-01
    • 2021-09-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多