grunt-contrib-connect

forwarding grunt connect to different url

你。 提交于 2020-01-05 08:00:51
问题 I'm using grunt connect with livereload for my dev environment. I want to be able to call the production api which is under /server. To do that I need to direct any calls from http://localhost:9000/server to http://www.production-server.com/server This is good for me because sometimes I want to test against the production server when in dev mode. Here's my current connect configuration (Generated by Yeoman): connect: { options: { port: 9000, // Change this to '0.0.0.0' to access the server

Get livereload to work with Sails.js

别等时光非礼了梦想. 提交于 2019-12-29 06:25:17
问题 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 options: {livereload:true} to my grunt-contrib-watch configuration but as far as I understand I need to somehow inject the livereload JavaScript into my page? I tried to use grunt-contrib-connect with the livereload option to inject the JavaScript but it

grunt-contrib-connect middleware CORS solution with keepalive true

↘锁芯ラ 提交于 2019-12-21 03:33:19
问题 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 0.7.1 of grunt-contrib-connect. connect: { dev: { options: { port: '9001', base: 'build', hostname: 'localhost', keepalive: true, middleware: function(connect, options, middlewares) { // inject a custom middleware into the array of default middlewares

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

好久不见. 提交于 2019-12-19 03:17:17
问题 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 files: httpd.conf <VirtualHost *:80> DocumentRoot "/Users/myusername/Sites/MyApp/app" ServerName myapp.dev <Directory "/Users/myusername/Sites/MyApp/app"> Options FollowSymLinks MultiViews Indexes AllowOverride All Order allow,deny Deny from none Allow

connect argument is undefined under middleware function

為{幸葍}努か 提交于 2019-12-14 04:08:01
问题 I have connect configuration for - grunt-contrib-connect connect: { options: { ... }, proxies: [{... }], livereload: { options: { base: gruntTargetPath, open: true, middleware: function(connect, options, middlewares) { return [ ..., connect.static('.tmp'), connect().use('/bower_components', connect.static('./bower_components')), connect.static(config.app) ]; } } } } When I execute on bash - grunt connect:livereload , it prompts - Warning: undefined is not a function Use --force to continue.

Trouble running Qunit tests with static server using grunt

梦想的初衷 提交于 2019-12-11 05:51:36
问题 Running the tests via a web browser works fine, but using grunt gives me errors. I struggle to understand what I'm doing wrong here. grunt tests fails with $ grunt tests Running "jsonlint:sample" (jsonlint) task >> 4 files lint free. Running "jshint:all" (jshint) task >> 4 files lint free. Running "connect:server" (connect) task Started connect web server on http://localhost:5000 Running "qunit:all" (qunit) task Testing http://localhost:5000/tests/tests.html F >> Settings.json tests -

grunt-connect: serve files with base url added

只谈情不闲聊 提交于 2019-12-04 18:34:17
问题 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 at: http://localhost:8081/index.html On my server, my files are located within a sub-directory, so have a base url prepended to all urls: http://path.to.server/mysite/index.html I cannot figure out a way to simulate the base url on my local dev setup with grunt-connect.

grunt-connect: serve files with base url added

自古美人都是妖i 提交于 2019-12-03 12:17:31
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 at: http://localhost:8081/index.html On my server, my files are located within a sub-directory, so have a base url prepended to all urls: http://path.to.server/mysite/index.html I cannot figure out a way to simulate the base url on my local dev setup with grunt-connect. Without that, I don't know how to reference my css or js files without the urls being invalid on either

grunt-contrib-connect middleware CORS solution with keepalive true

﹥>﹥吖頭↗ 提交于 2019-12-03 11:42:16
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 0.7.1 of grunt-contrib-connect. connect: { dev: { options: { port: '9001', base: 'build', hostname: 'localhost', keepalive: true, middleware: function(connect, options, middlewares) { // inject a custom middleware into the array of default middlewares // this is likely the easiest way for other grunt plugins to // extend the behavior of grunt-contrib

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

99封情书 提交于 2019-12-01 00:02:39
问题 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 the server from outside. hostname: 'localhost', livereload: 35729, middleware: function(connect, options, next) { return [ function(req, res, next) { res.setHeader('Access-Control-Allow-Origin', '*'); res.setHeader('Access-Control-Allow-Methods', 'GET,PUT,POST