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

grunt-devserver

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-devserver

a simple web server without caching for development

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
80
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Developer Web Server

grunt-devserver provides a simple way to quickly get a development server serving up your content with

  • no caching content
  • CORS headers for cross-domain requests
  • logs requests to console
  • install globally and run from command line or Grunt 0.4.x
  • quickly configure https server

As a developer I needed a lightweight way to serve up client-side applications and content in isolation from a larger server application. Something that supported a rapid workflow and integrated with my tools.

Installation

Install it from the command line into your project

npm install grunt-devserver --save-dev

Or add it to your package.json devDependicies

"devDependencies": {
    "grunt-devserver": "*"
}

Or install it globally

npm install grunt-devserver -g

Usage

From the Command Line

Once grunt-devserver has been installed globally you can run it from any folder by typing devserver

Command line options:

-t, --type (server type) http|https (default is http)
-p, --port (port number) listen on this port
-f, --folder (full path to a folder) serves this folder
--cache (method) the method to return in the Cache-Control HTTP header. Default is no-cache.

From Grunt 0.4.x

In your GruntFile.js file add this to your grunt configuration:

devserver : { options: { 'type' : <string> (http|https defaults to http)
                       , 'port' : <port number> (defaults to 8888)
                       , 'base' : <directory> (defaults to .)
                       , 'cache' : <string> (defaults to 'no-cache')
                       }
            }

Load the devserver task:

grunt.loadNpmTasks(grunt-devserver)

and execute using:

grunt devserver

From Yeoman 1.0

Yeoman automatically loads all node_modules prefixed with "grunt" as grunt tasks. Just install grunt-devserver and you're ready to go

grunt devserver

Version Notes

0.3.0

  • added https support #2
  • conformed to the grunt options standard (breaking change)
  • added type parameter

0.2.2

  • added cache control option #1

Future

  • serve up multiple folders on a single server
  • file configuration with a .devserverrc file
  • start multiple servers using a grunt multiconfig or using a file config
  • proxy service
  • websocket server

Logos and Tools

Logos and tools are property of their respective owners.
Grunt
Yeoman

Keywords

FAQs

Package last updated on 23 May 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