Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-connect

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-connect

Run a connect server, indefinitely.

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

grunt-connect

Run a connect server, indefinitely. The built in Grunt server task is terrific for the great majority of cases, however sometimes you just want to ability to run a web server on a local file system and interact with the files using a web browser.

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-connect

Then add this line to your project's grunt.js gruntfile:

grunt.loadNpmTasks('grunt-connect');

Documentation

Settings

  • port - port to listen, default 1337
  • base - base directory, default ".", unless combine is used
  • combine - combine multiple bases into single server. If file is not found in first one, it tries to find in second, and so on. If base is also specified, it is on first position.

Content of directories is listed. In case multiple bases, it lists only files from first base with given directory (directory contents are not combined).

Since, these tasks are essentially asynchronous tasks that don't close. It's best to target them directly. For example, given the following configuration:

grunt.initConfig({
  connect: {
    example: {
      port: 1337,
      base: 'example'
    },
    meta: {
      port: 1338,
      base: 'tasks'
    },
    combined: {
      port: 1339,
      combine: [
        'example',
        'tasks'
      ]
  }
});

One might target the meta server using grunt connect:meta

License

Copyright (c) 2012 Merrick Christensen Licensed under the MIT license.

Keywords

FAQs

Package last updated on 14 Jan 2013

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc