grunt serve监听成功,通过curl可以访问,为何浏览器访问不了?
Qi-MacBook-Pro:mcoding wenki$ sudo grunt serve
Running "serve" task
Running "clean:server" (clean) task
Running "concurrent:server" (concurrent) task
Running "coffee:dist" (coffee) task
File app/scripts/router.js created.
Done, without errors.
Execution Time (2015-07-09 07:31:38 UTC)
loading tasks 1.1s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 79%
coffee:dist 288ms ▇▇▇▇▇▇▇▇▇▇ 21%
Total 1.4s
Running "less:dist" (less) task
File app/styles/bootstrap.css created: 94.42 kB → 77.37 kB
Done, without errors.
Execution Time (2015-07-09 07:31:38 UTC)
loading tasks 1.1s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 57%
less:dist 832ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 43%
Total 1.9s
Running "compass:server" (compass) task
Done, without errors.
Execution Time (2015-07-09 07:31:38 UTC)
loading tasks 1.1s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 54%
compass:server 917ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 46%
Total 2s
Running "connect:livereload" (connect) task
Started connect web server on 127.0.0.1:80.
Running "watch" task
Waiting...
Qi-MacBook-Pro:~ wenki$ curl http://localhost
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
但是浏览器却访问不了http://localhost,一直在转圈。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查一下你是否开了 vpn 或者是 http 代理。如果开了请把模式切换成非 “全局代理”。或者将 vpn 或者是代理关闭。