Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Gulp package that will serve a site through IIS Express

License

Notifications You must be signed in to change notification settings

mitchwinn/gulp-serve-iis-express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-serve-iis-express

IIS Express server plugin for gulp. This repository is forked off of gulp-iis-express (not actively maintained) with necessary fixes and improvements.

Install

Install gulp-serve-iis-express as a development dependency:

npm install gulp-serve-iis-express --save-dev

Usage

Create a new task using gulp-serve-iis-express, which might look like below:

'use strict';

var gulp = require('gulp');
var iisexpress = require('gulp-serve-iis-express');

gulp.task('serve:site', function() {
    var configPath = path.join(__dirname, '..\\.vs\\config\\applicationHost.config');

    iisexpress({
        siteNames: ['site'],
        configFile: configPath
    });
});

Advanced Usage

Parameters

There are multiple parameters you can supply the object passed into the gulp-serve-iis-express variable:

configFile // Required (String) path to the config file.
siteNames // Required (String Array) array of site names.
appPath // Optional (String) application folder path.
port // Optional (Number) port number to serve the application. Defaults to 8080.
clrVersion // Optional (String) Version of clr.
sysTray // Optional (Boolean) Show the application in the system tray.
iisExpressPath // Optional (String) Path to IIS Express if different from programfiles (x86)

Additional Functionality

You can also call an additional function to launch the browser with a specified url after the server has been started. FYI, this is a work in progress currently and may not function correctly at the moment.

iisexpress.launchBrowser({
    startUrl: 'localhost:3000',
    browser: 'chrome',
    siteFile: 'index.html'
});

Contributing

Please open an issue first, then create a pull request with changes/additions linked to the issue.

License

MIT License

About

Gulp package that will serve a site through IIS Express

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published