Questions tagged [gulp-connect]

gulp integration with web server (starts webserver)

Starts web server from gulp for manual testing with "live reload" support or for test automation.

gulp.task('automation-tests', function() {
  // start server
  connect.server({
    port: 8000
  });

  // run tests
  // ...

  // stop server
  connect.serverClose();
});

https://github.com/avevlad/gulp-connect#readme

31 questions
8
votes
4 answers

Gulp-Connect lists directory instead of showing index.html. Why?

What is wrong with this gulp file? When it opens the browser, it does not show index.html. Instead, it lists the contents of 'dist', the directory containing index.html. "use strict"; var gulp = require('gulp'); var connect =…
Phillip Scott Givens
  • 4,596
  • 2
  • 26
  • 44
8
votes
1 answer

gulp-connect and gulp-open file not load through the server

I'am trying to run a web server and open an HTML file via gulp-connect and gulp-open. The server is running, the html is opened correctly but not through the server but as a file from the HDD. On the URL address bar I can see: "file:///Users/...."…
Samo
  • 81
  • 2
5
votes
2 answers

Live reload is not working after upgrading to Gulp 4

My gulpfile.js looks like below, var gulp = require('gulp'); var pug = require('gulp-pug'); var sass = require('gulp-sass'); var minifyCSS = require('gulp-csso'); var concat = require('gulp-concat'); var sourcemaps = require('gulp-sourcemaps'); var…
4
votes
3 answers

Failed To Load Template Issue

Using AngularJS-1.6.5 & Angular-ui-router-1.0.6 && Gulp-3.9.1 I'm having this absolutely annoying issue. I have an angular app that seems to build fine but when I run gulp-connect to run it, I keep getting failed to load template errors in this…
JakeHova
  • 945
  • 12
  • 29
4
votes
3 answers

gulp connect not opening browser

I tried setting up the least possible setup for gulp-connect. It shows the following in the terminal window: Server started http://localhost:8080. However it doesn't start Chrome as expected and seen in this video. var gulp = require('gulp'), …
Kris van der Mast
  • 15,905
  • 7
  • 35
  • 57
3
votes
0 answers

Can't use gulp (with gulp-connect-php and gulp-browser-sync) with multiple projects

I've recently started using gulp and have a nice workflow but when I added the gulpfile to a new project, every time I run gulp from the original project directory, it serves the newest project and I have no idea what I've done. This should be the…
2
votes
1 answer

Make gulp sync php files

I want make gulp work with php files, so I search and see that I need gulp-connect-php plugin. After install it, I have tried a lot of possibilities but no success. My last code is below. var gulp = require('gulp'); var connect =…
2
votes
1 answer

Gulp reload doesn't work

I want use gulp reload on my workflow, but I have trouble with it. When I started via "gulp" command in command line I have server connection, but when I go to my browser there is the massege "Cannot GET /" What is it, and how can I solve this…
S.Hagvin
  • 85
  • 10
2
votes
0 answers

Is it possible to point gulp-connect to middleware (i.e. "app.js") file instead of index.html?

sorry for a silly question - new to node.js environment and trying to figure out how to setup default entry point to app.js instead of index.html using node.js and gulp-connect for livereload below code works for index.html in "builds/development"…
vxb8874
  • 101
  • 1
  • 9
2
votes
1 answer

Bower components root when using gulp connect

So my directory structure at its root contains app/ bower_components/ node_modules ..bowercc gulpfile.js ....etc..... under app are other folders like" /css/ /js/ /assets/ index.html /view/ So my issue is this with a very simple gulp file. My…
Mark
  • 1,602
  • 2
  • 22
  • 47
1
vote
0 answers

Pass Gulp memory stream to gulp-connect

How can I pass a memory stream to gulp-connect instead of creating files on a hard drive? I want to make gulp-connect serve files from memory. gulp.src('style.less') .pipe(less()) .pipe(rename('style.css')) .pipe(gulp.dest('dist')) //…
Alexander Shutau
  • 2,234
  • 18
  • 31
1
vote
0 answers

How to combine client and server on a DEV machine?

I'm developing a website with Angular.js, which uses an HTTP interceptor. When I'm running the website on a DEV machine, I want my HTTP interceptor to write each HTTP request/response into a local PostgreSQL server. I understand very well that I am…
vitaly-t
  • 20,421
  • 5
  • 85
  • 117
1
vote
2 answers

How to redirects http to https using gulp-connect

How to force https (redirect http to https) using gulp-connect on Heroku? I've already configured SSL on Heroku and my website works great if I prefix https:// before the domain. gulpfile.js 'use strict'; var gulp = require('gulp'); var $ =…
1
vote
1 answer

Gulp-connect with Express server?

How to configure gulp-connect to run file at bin/www (express)? I can't make it work, I find no documentation on gulp-connect site that deal with config/change the starting file used by gulp-connect. var gulp = require('gulp'), connect =…
DennyHiu
  • 2,126
  • 3
  • 28
  • 57
1
vote
0 answers

Gulp error downloading files

I'm creating an Angular application using gulp and gulp connect to deploy the web app. If I use gulp 3.8.11 and gulp-connect 2.0.6 I can download file using the following way: The problem is when I upgrade the gulp…
Kevin Sanchez
  • 1,922
  • 2
  • 8
  • 18
1
2 3