horizion连接到现有expressjs应用程序会导致400个错误请求

horizion连接到现有expressjs应用程序会导致400个错误请求,express,rethinkdb,horizon,Express,Rethinkdb,Horizon,我尝试从htmlpage连接到expressjs应用程序over horizon 我的服务器是这样的[: 然后我点击了这个链接: 并创建了以下html: <!doctype html> <html> <head> <meta charset="UTF-8"> <script src="http://localhost:8181/horizon/horizon.js"></script> <s

我尝试从htmlpage连接到expressjs应用程序over horizon

我的服务器是这样的[:

然后我点击了这个链接: 并创建了以下html:

<!doctype html>
<html>
  <head>
    <meta charset="UTF-8">
    <script src="http://localhost:8181/horizon/horizon.js"></script>
    <script>
      var horizon = Horizon({host: 'localhost:8181'});
      horizon.onReady(function() {
        document.querySelector('h1').innerHTML = 'App works!'
      });
      horizon.connect();
    </script>
  </head>
  <body>
   <marquee><h1></h1></marquee>
  </body>
</html>
它会导致400错误:

轮询xhr.js:250GET 400(错误请求)

index.js:66收到错误:错误:Websocket ws://localhost:8181遇到错误

有什么问题,我如何获得到express后端的有效连接? 我看到了这个,但我不知道是不是同样的问题

更新 我为我的问题创建了一个,并在上问了相同的问题。

信息:似乎是a,应该在下一版本中修复。

信息:似乎是a,应该在下一版本中修复

<!doctype html>
<html>
  <head>
    <meta charset="UTF-8">
    <script src="http://localhost:8181/horizon/horizon.js"></script>
    <script>
      var horizon = Horizon({host: 'localhost:8181'});
      horizon.onReady(function() {
        document.querySelector('h1').innerHTML = 'App works!'
      });
      horizon.connect();
    </script>
  </head>
  <body>
   <marquee><h1></h1></marquee>
  </body>
</html>
"dependencies": {
    "@horizon/server": "^1.0.3",
    "express": "^4.13.4",
    "horizon": "^1.0.3"
  }