【发布时间】:2020-05-08 01:56:43
【问题描述】:
我已经使用 React 和 Node.js 构建了一个单页天气应用程序,但似乎无法将其部署到 Heroku。到目前为止,我有:
- 在 Heroku 上创建了一个名为 weather-app-react-node 的新应用
- 在 CLI 上登录 Heroku
- 在我的终端中运行命令“heroku git:remote -a weather-app-react-node”
- 添加了一个带有“web: npm start”的 Procfile
- 运行 'git add .', 'git commit -m "Pushed to heroku"', 'git push heroku master'
我的终端告诉我它已部署并等待,但是当我点击链接时,我收到以下错误消息:
SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
我尝试用谷歌搜索,但似乎找不到与我的情况相关的任何内容。有人知道怎么解决吗?
heroku 站点:https://weather-app-react-node.herokuapp.com/
github:https://github.com/caseycling/weather-app
【问题讨论】:
标签: node.js reactjs heroku heroku-ci