问题标签 [grunt-contrib-connect]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
gruntjs - grunt-contrib-connect 服务器无法连接 t localhost
我的 Gruntfile:
然后,当我运行时grunt connect
,我看到了这个:
然后就是这样。如果我到达我的本地主机:8000。我看到 chrome 无法连接。
node.js - 如何在防火墙后面配置 grunt-connect-proxy?
我正在尝试设置grunt-contrib-connect
为我的 XHR 调用提供代理。我发现grunt-connect-proxy
这似乎是我想要的。但我在不允许来自的请求node
通过的公司防火墙后面。
我得到的错误是:
An error has occurred: {"code":"ETIMEDOUT","errno":"ETIMEDOUT","syscall":"connect"}
如何设置connect
任务以使其通过公司防火墙?
javascript - Grunt - 启动并运行 livereload 的服务器
我已经盯着我的 grunt 配置看了几个小时,似乎无法启动和运行。
我的文件正在我期望的地方构建(基本上就在它们所在的地方,除了车把),但我真的很难让自动刷新服务器启动并运行。无法完全启动和运行。
如果有人能指出我正确的方向,那将是一个巨大的帮助!
javascript - grunt-contrib-connect 和访问被拒绝页面
我正在为我的 angularJs 项目使用 grunt-contrib-connect(package.json 中的 ^0.8.x)。
当我开始任务时,grunt connect
我的外壳说:
我的浏览器打开一个新选项卡http://0.0.0.0:8000
,我有一个拒绝访问页面
这是我的代码:
我是 mac 用户 10.9.5
我用windows XP的朋友没有这个问题。
你有想法吗?
javascript - 使用 grunt-contrib-connect 和 grunt-contrib-watch 实时重新加载
我是 nodeJS 和 grunt 的新手。我在这个项目中有这个 Gruntfile,我想为我的项目中的所有 html 文件进行实时重新加载,这样我就不必一直刷新浏览器来检测新的更改。不知何故,我遇到以下代码错误:
似乎当我启动“grunt default”时,它不会执行任务监视,因为在连接期间它是保持活动状态。
如果 any1 可以向我解释为什么在 JSHint 检查我的代码并提出解决方案时会出现此错误,我将不胜感激。
angularjs - grunt-connect-proxy 为 204 响应发送 application/json 内容类型
当我发出一个返回 204 的GET
请求grunt-connect-proxy
时,没有设置内容类型。如果我提出相同的请求但使用PUT
, grunt-connect-proxy
(或grunt-contrib-connect
- 我不知道)会Content-type: application/json
自动附加到响应中。这是一个问题,因为1)没有内容,所以说内容类型是什么是不准确的。更重要的是2) Angular 尝试将空响应解析为 JSON,这会破坏我的应用程序。
我已经通过浏览器测试了端点,实际服务器没有发回这些附加信息。
如何防止grunt-connect-proxy
(或grunt-contrib-connect
)向204 No Content
响应中添加内容类型?
angularjs - Cannot GET / page
I am trying to use grunt contrib connect for local development and testing of an angular app.
the gruntfile is configured like so:
and the task
grunt serve
opens the browser with the file listing of the root directory. Clicking on the dist
directory launches the app. Everything is fine until here: it's possible to change page from the app menu, but… direct access or reload of any of these pages, gives Cannot GET /dist/page
… It's necessary to go back to `localhost:8080/dist' to make it work again…
What could I do to make this work?
gruntjs - Grunt 连接代理:404
我有几个月的工作咕噜声设置并且没有改变我身边的任何东西,代理的东西停止工作。它可能与一些 npm 包更新或系统更新(os x)有关,但不知何故我的代理坏了:
执行请求时,我有以下代理日志:
/web/app_dev.php/oauth/v2/token -> http://gambify.sites.dev:80/web/app_dev.php/oauth/v2/token
这导致找不到 404。但是,如果我将我的请求直接卷曲到http://gambify.sites.dev:80/web/app_dev.php/oauth/v2/token一切似乎都工作正常,所以我的端点实际上就在那里。并且 grunt 也实现了该位置的请求和代理,但我仍然得到 404。
有没有人经历过类似的事情?
最好的问候,马克
grunt-contrib-connect - 如何允许其他设备访问由 grunt-contrib-connect 创建的服务器?
对于 grunt-contrib-connect,我有以下选项。我可以在自己的桌面上正常运行连接。
我应该如何允许其他设备(其他电脑、平板电脑或手机)访问我的桌面?
我试过 xip.io 但我似乎无法让它工作。
非常感谢您的帮助!