
Product
Introducing Socket Scanning for OpenVSX Extensions
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.
grunt-iisexpress-sans-lodash
Advanced tools
Start an IIS Express process.
Fork of grunt-iisexpress
This plugin requires Grunt ~0.4.1
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-iisexpress-sans-lodash --save-dev
One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-iisexpress-sans-lodash');
In your project's Gruntfile, add a section named iisexpress to the data object passed into grunt.initConfig().
grunt.initConfig({
iisexpress: {
server: {
options: {
port: 3000
}
}
}
});
Type: String
Default value: c:/program files/iis express/iisexpress.exe
A string value that specifies the location of the IIS Express executable.
Type: Boolean
Default value: false
Keep the server alive until Grunt is terminated (via ctrl+c for example). Note that if this option is enabled, any tasks specified after this task will never run. By default, once Grunt tasks have completed, the web server stops. This option changes that behavior.
This option can also be enabled ad-hoc by running the task like grunt iisexpress:targetname:keepalive.
Type: Boolean
Default value: true
Kills IIS Express process after Grunt tasks have completed. Enabled by default. If you want to keep IIS Express server running after Grunt tasks have completed, set to false.
Type: String
Default value: ''
A string value that is used to determine when the IIS Express process should be killed. By default IIS Express process will be killed when Grunt exits (if not disabled by killOnExit option set to false). Here you can specify the name of an event to trigger IIS Express process kill when you need it.
Type: Boolean
Default value: false
If set to true, requested URL will be opened in the browser after IIS Express server is started. Entire URL to open can be specified using openUrl option or it will be 'http://localhost:{port}{openPath}', where port and openPath are another options. By default is false.
Type: String
Default value: '/'
The path part of the URL to be opened in the browser. Will not work without open option set to true.
Type: String
Default value: null
The URL to be opened in the browser after IIS Express server is started. Will not work without open option set to true.
Type: Boolean
Default value: false
Enable verbose output, both for Grunt task and IIS Express. Disabled by default.
Refer to the IIS Express command line documentation for the following options.
Type: String
Default value: require('path').resolve('.')
The full physical path of the application to run. You cannot combine this option with the config and related options.
Type: Integer
Default value: 8080
The port to which the application will bind. The default value is 8080. You must also specify the path option.
Type: String
Default value: v4.0
The .NET Framework version (e.g. v2.0) to use to run the application. The default value is v4.0. You must also specify the path option.
Type: String
Default value: null
The full path to the applicationhost.config file. The default value is the IISExpress8\config\applicationhost.config file that is located in the user's Documents folder.
Type: String
Default value: null
The name of the site to launch, as described in the applicationhost.config file.
Type: String
Default value: null
The ID of the site to launch, as described in the applicationhost.config file.
Type: Boolean
Default value: true
Enables or disables the system tray application. The default value is true.
Type: String
Default value: null
Valid values are info or i, warning or w, error or e.
In this example, grunt iisexpress will start an IIS Express server at http://localhost:8000/, with its base path set to the root directory relative to the gruntfile, and any tasks run afterwards will be able to access it.
grunt.initConfig({
iisexpress: {
server: {
options: {
port: 8000
}
}
}
});
If you want your web server to use the default options, just omit the options object. You still need to specify a target (uses_defaults in this example), but the target's configuration object can otherwise be empty or nonexistent. In this example, grunt iisexpress will start a web server using the default options.
grunt.initConfig({
iisexpress: {
uses_defaults: {}
}
});
By default IIS Express process will be killed when Grunt exits (if not disabled by killOnExit option set to false). You can also specify the name of an event to trigger IIS Express process kill when you need it.
You may be able to listen to an event emitted by another Grunt plugin that you are using. For example, to kill IIS Express after running grunt-contrib-qunit tests:
grunt.initConfig({
iisexpress: {
server: {
options: {
port: 8000,
killOn: 'qunit.done'
}
}
},
qunit: {
test: {
options: {
urls: ['http://localhost:8000/test/foo.html']
}
}
}
});
If there is not an event available for you to use, you can register a small custom task with Grunt:
grunt.initConfig({
iisexpress: {
server: {
killOn: 'mytasks.done'
}
}
});
grunt.registerTask('iisexpress-killer', function(){
grunt.event.emit('mytasks.done');
});
grunt.registerTask('default', ['iisexpress', 'iisexpress-killer']);
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
(Nothing yet)
FAQs
Start an IIS Express process
We found that grunt-iisexpress-sans-lodash demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies