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
30
votes
2 answers

Warning: connect.static is not a function Use --force to continue

I am using YO lessapp project, "grunt-contrib-connect" helps me to start a node js server on 9000 port. Whenever I run grunt serve (start the server) the service is aborted due to the below warning. Running "connect:livereload" (connect)…
kishorekumaru
  • 1,500
  • 2
  • 19
  • 33
14
votes
1 answer

grunt-contrib-connect middleware CORS solution with keepalive true

For my local development system I am trying to serve front-end assets using grunt-contrib-connect. I need a cross-domain solution for using fonts in Firefox. The server runs just fine, but I cannot seem to get the headers set. I am using version…
absolutholz
  • 145
  • 1
  • 6
11
votes
4 answers

Grunt connect task and middleware Access-Control-Allow-Origin

I would like to allow access to cross origin calls which I need to be able to perform rest API calls to the server. My connect grunt task is configured as follows: connect: { options: { port: 9000, // Change this to '0.0.0.0' to access…
10
votes
4 answers

Using grunt-contrib-connect - open page URL with added context path

I have set up grunt connect like this: connect: { options: { port: 9000, livereload: 35729, hostname: 'localhost' }, livereload: { options: { open: true, base: [ …
Steve
  • 779
  • 2
  • 6
  • 18
10
votes
2 answers

grunt-connect: serve files with base url added

I am developing jekyll-based site using grunt as my task manager. I am using grunt-contrib-connect to serve my files locally for development because of its livereload functionality. Those files are accessible in the browser…
abelnation
  • 121
  • 2
  • 6
9
votes
2 answers

Grunt connect server returns cannot GET /route with backbone

I have a connect server running on localhost, and in my backbone app, if I reload a route, say localhost:8000/fun the server returns Cannot GET /fun obviously because /fun doesn't exist. Somehow the server needs to know to serve index.html/fun or…
dezman
  • 18,087
  • 10
  • 53
  • 91
7
votes
1 answer

Display PDF in browser through grunt-contrib-connect

I'm running an AngularJS app and I'm using the grunt-contrib-connect plugin to host my stuff. I'd like some PDF files to be accessed in the browser (tested in all of them), but the pages stay blank. It does show the correct amount of pages, though.…
Nick
  • 560
  • 6
  • 19
6
votes
2 answers

Grunt server does not use virtual host name for my app..vhost and httpd are set up but grunt is not using them

So I am trying to setup my app with a name rather than using 127 0 0 1. Every single time I run grunt, my address is http://127.0.0.1:9000/#/ ... I've tried many things and nothing is working...I always get redirected to that place. Here are my…
Georgi Angelov
  • 4,338
  • 12
  • 67
  • 96
5
votes
1 answer

grunt-contrib-connect error :middleware undefined

I am using yeoman's angular generator for my AngularJS app. This generator includes grunt and grunt-contrib-connect, which are very useful... but the dependencies are outdated, so I decided to update those. When doing so, I have an error for…
Nicolas
  • 75
  • 9
5
votes
2 answers

Get livereload to work with Sails.js

I am new to both Sails and grunt so I might be missing the obvious. I am trying to automatically refresh my sails app in the browser whenever files change. I start the app with sails lift and it runs on the default port 1337. I tried adding…
4
votes
3 answers

Grunt connect not starting with error "root path must be a string"

I'm trying to set up my Gruntfile to use the grunt connect npm module. I'm having an issue when trying to start up my server with the command grunt clean server. It errors with the line: Warning: root path must be a string Use --force to…
Jon Rubins
  • 4,323
  • 9
  • 32
  • 51
4
votes
2 answers

Live reload using grunt-contrib-connect and grunt-contrib-watch

I am new to nodeJS and grunt. I have this Gruntfile in this project and I want to do live reload for all the html files in my project, so that I do not have to refresh my browser all the time to detect new changes. Somehow I encounter error with the…
4
votes
2 answers

How to allow grunt-contrib-connect to allow POST,PUT,DELETE methods on static files?

I have a static project and I am hitting dummy seed JSON files, however its only allowing me to access them via GET. Here is my grunt configuration file, does anyone know how I would allow POST? module.exports = function(grunt) { // Configure …
Darren
  • 10,631
  • 8
  • 42
  • 64
4
votes
1 answer

Grunt-contrib-connect: how to launch the server in a specified browser

I'm quite new to the bower / grunt / yeoman environment. I'm trying to customize the app generated by the default yeoman Webapp generator. Basically when I launch grunt serve the default browser will be launched opening the url served by the grunt…
Leonardo
  • 4,046
  • 5
  • 44
  • 85
3
votes
2 answers

grunt doesnot reload server on watch livereload

I have been trying to reload the server if the any of the file changes. I can watch the files which has been changed but it does not reload my server. GruntFile.js module.exports = function(grunt){ grunt.initConfig({ pkg:…
1
2 3 4 5 6 7 8