
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
grunt-web-server
Advanced tools
A Web Server task similar to Python's SimpleHTTPServer, with Cross-Origin Resource Sharing and No-Cache options.
A Web Server task for grunt similar to Python's SimpleHTTPServer, with Cross-Origin Resource Sharing and No-Cache options.
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-web-server --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-web-server');
In your project's Gruntfile, add a section named web_server to the data
object passed into grunt.initConfig().
Please take special note of the foo: "bar" property below. For some reason an extra key with a non-object value is necessary for things to work. Clearly I'm not understanding something about writing a Grunt plugin here... would appreciate a pull or note if anyone knows what I'm doing wrong.
grunt.initConfig({
web_server: {
options: {
cors: true,
port: 8000,
nevercache: true,
logRequests: true
},
foo: 'bar' // For some reason an extra key with a non-object value is necessary
},
})
Type: Boolean
Default value: true
Whether to send Cross-Origin Resource Sharing headers.
Type: Int
Default value: 1337
What port to server web requests on.
Type: Boolean
Default value: true
If true, then the server will send headers to try to force the browser to request files afresh each time.
Type: Boolean
Default value: true
If true, then the server will log all incoming requests and the HTTP status of their result.
Once you've configured the web server as above, run the web server with:
grunt web_server
Terminate the web server with Ctrl-C
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.
FAQs
A Web Server task similar to Python's SimpleHTTPServer, with Cross-Origin Resource Sharing and No-Cache options.
The npm package grunt-web-server receives a total of 88 weekly downloads. As such, grunt-web-server popularity was classified as not popular.
We found that grunt-web-server 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.