下面是dart web服务教程:http://www.dartlang.org/articles/json-web-service/
当我尝试从关联的git代码code运行代码时
我得到以下错误。
Loading structured data
Failed to load resource
http://127.0.0.1:8080/programming-languages
Uncaught Error: Instance of 'HttpRequestProgressEvent'
Exception: Instance of 'HttpRequestProgressEvent'来自自述的code/blob/master/README.md
这意味着我需要
To execute, either run:
dart simpleserver.dart
Load the project into the Dart Editor, and click "Run"
This starts the server listening on http://localhost:8080我需要在哪里运行
dart simpleserver.dart
指挥部?是否有其他本地服务器设置要求可能丢失?谢谢,(Windows 8 Pro)
发布于 2013-06-11 02:32:28
如果我在浏览器中运行客户端而不首先启动服务器,我可以再现您的错误消息。正如您所包含的文档(但似乎并不理解)所指出的,您有两种方法来运行服务器:从命令行运行服务器或从Dart编辑器运行服务器。如果您使用的是Dart编辑器:
simpleserver/simpleserver.dart,然后单击“Run”按钮。json_clien/web/json_client.dart,然后单击“Run”按钮。这将在捆绑的Dartium浏览器中加载json_client.html,一切都应该正常工作。
如果您更喜欢使用命令行(听起来不像这样),请导航到simpleserver目录,然后运行dart simpleserver.dart。然后在Dartium中手动加载json_clien/web/json_client.html。
这两种方法都适用于我在Linux上使用Dart 0.5.13.1_r23552。
https://stackoverflow.com/questions/17035349
复制相似问题