Questions tagged [grunt-contrib-connect]

grunt-contrib-connect is a plugin for the Javascript task runner Grunt. The primary use is to start a connect web server.

107 questions
3
votes
0 answers

Directory listing and static paths with grunt-contrib-connect

I'm trying to get grunt-contrib-connect to work with a directory listing but I also need some static paths as well. This configuration allows me to browse static html files and it works fine. server: { options: { base: 'src/', open:…
screenm0nkey
  • 18,405
  • 17
  • 57
  • 75
3
votes
2 answers

How to run grunt-connect within docker container

I have Grunt running a node connect (grunt-contrib-connect) web server on localhost:8080 in a docker container. I run the container with this command: $ docker run --rm -it -p 8080:8080 js1972/yeoman:v3. Inside my container I run the grunt connect…
Jason Scott
  • 643
  • 4
  • 15
3
votes
1 answer

How to redirect requests / proxy based on User-Agent (mobile and desktop) using Grunt or Node server?

I'm using Grunt and its proxying library grunt-connect-proxy. I have two servers setup for the desktop and mobile versions of my site (both of which have separate assets and such, hence the separation). Both sites are hosted on 0.0.0.0 but on…
liamzebedee
  • 14,010
  • 21
  • 72
  • 118
3
votes
1 answer

Rewrite URL with grunt

I've a app for which I need to change some url. For example localhost:9000 should look like localhost:9000/myapp All the static files will have url in html like myapp/style/main.css. But in actual myapp folder will not exist, I just need to show it…
Pal Singh
  • 1,964
  • 1
  • 14
  • 29
3
votes
1 answer

Setting up grunt to launch & live reload browser (with minimal plugins)

I'm setting up a web project and want to use grunt for automation and workflow. I have sass, jshint, jsdocs, minifiers all playing nice but am having no end of trouble with launch & reload of browser from the grunt shell. I have 2 conditions I'd…
3
votes
1 answer

grunt-contrib-connect: Only root is reachable, only on CI server

I have been beating my head against a wall trying to figure out what is going on and I am hoping that someone can help. I am using grunt-contrib-connect to start up a static server to run mocha specs against using selenium. Locally on OS X 10.10,…
ryanbillingsley
  • 215
  • 4
  • 12
3
votes
0 answers

Grunt Connect Proxy: 404

i had a working grunt setup for months and without changing anything on my side, the proxy stuff stopped working. It might be related to some npm package updates or system updates (os x), but somehow my proxy broke: I have the following proxy log,…
m0c
  • 2,180
  • 26
  • 45
3
votes
1 answer

Specify headers with grunt-contrib-connect

Is it possible and if so how can one specify custom headers with grunt-contrib-connect?
Brian M. Hunt
  • 81,008
  • 74
  • 230
  • 343
2
votes
1 answer

Grunt Connect CORS errors in browser

I am trying to connect a small angular app to my rest webservice written in spring. My tomcat server is running on localhost:8080 and my grunt server is running on localhost:11000. This causes CORS errors in the console and I cannot make requests…
berimbolo
  • 3,319
  • 8
  • 43
  • 78
2
votes
0 answers

How do you use connect-livereload in grunt?

I was struggling to get my server to reload so I followed some links and ended up at connect-livereload. However, when I try to use the grunt code in my grunt file connect: { options: { port: 3000, hostname: 'localhost' }, dev: { …
CodyBugstein
  • 21,984
  • 61
  • 207
  • 363
2
votes
1 answer

Grunt redirect rest call to file

I am using grunt connect server with all those livereload plugins. Developing process was very fast till I added some rest calls. I decided to make some example JSON files which ll be rest calls answers. So I need to redirect every rest call to…
user2771738
  • 913
  • 11
  • 31
2
votes
2 answers

Gruntfile.js with grunt-contrib-connect Proxy error: ECONNRESET

I have finally ran into an issue that is beyond my skill and no-one in house is very familiar with the issue at hand either. My issue is I am attempting to get grunt serve/server working on windows 7/8 at work to replace our current nginx…
Rhineb
  • 305
  • 3
  • 12
2
votes
1 answer

Proxy CORS requests with grunt to localhost

My app (http://localhost:8099) is doing some CORS requests to https://api.parse.com/ that I want to proxy to my local api http://localhost:8077 for testing purposes. Can this be achived with grunt-connect-proxy? Here's my config of…
Dziamid
  • 11,225
  • 12
  • 69
  • 104
2
votes
1 answer

How to change the path before injection

Is it possible to change the path of the injected file before injection occurs? I am using Grunt/Bower/Connect/Wiredep, and my directory structure is: www |- dev-dist/ |- node_modules/ |- src/ |- vendor/ |- bower.json |- Gruntfile.js |-…
2
votes
2 answers

Grunt-contrib-watch with grunt-contrib-connect

Unfortunately, grunt-contrib-watch and grunt-contrib-connect don't seem to be playing nice. On the grunt-contrib-connect readme it says: Note that this server only runs as long as grunt is running. Once grunt's tasks have completed, the web server…
shennan
  • 10,798
  • 5
  • 44
  • 79