在 Heroku 上部署 PeerJS 服务器 [英] Deploy PeerJS server on Heroku

查看:60
本文介绍了在 Heroku 上部署 PeerJS 服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 PeerJS 服务器的问题.我从这里使用了部署到 Heroku"按钮:https://github.com/peers/peerjs-server

I have a problem with PeerJS server. I used "Deploy to Heroku" button from here: https://github.com/peers/peerjs-server

我不知道如何连接已部署的云.我找不到关于 PeerJS Server 的明确文档.

I have no idea how can I connect with deployed cloud. I can't find clear documentatnion about PeerJS Server.

我不知道我的应用的主机、端口和路径是什么.

I don't know what is the host, port, and path for my app.

var peer = new Peer('someid', {host: 'localhost', port: 9000, path: '/myapp'});

请指教.

推荐答案

这对我有用:

var peer = new Peer('someid', {
                secure: true, 
                host: 'your-app-name.herokuapp.com', 
                port: 443,
    });

这篇关于在 Heroku 上部署 PeerJS 服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆