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

grunt-nginx

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-nginx

Grunt task for Nginx to start, stop and restart a server.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
758
decreased by-16.79%
Maintainers
1
Weekly downloads
 
Created
Source

grunt-nginx

Grunt task for Nginx to start, stop and restart a server.

Getting Started

Install the plugin with this command:

npm install grunt-nginx --save-dev

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

grunt.loadNpmTasks('grunt-nginx');

Overview

Inside your Gruntfile.js file add a section called nginx. This section specifies the nginx task and any options you want to pass to it.

Arguments

grunt-nginx uses colon-separated arguments for the nginx tasks:

  • nginx:start
  • nginx:stop
  • nginx:restart

These are all self-explanatory.

Options

config string

Specify which configuration file Nginx should use instead of the default.

prefix string

Sets the prefix path (default: /usr/local/nginx/). Any references in the config file will be relative to this path.

globals string

Sets global directives. Further Information can be found here.

test string

Don't run, just test the configuration file. Nginx checks configuration for correct syntax and then try to open files referred in configuration.

Example

nginx: {
    options: {
        config: '/home/alex/nginx.conf',
        prefix: '/home/alex/nginx'
        globals: ['pid /var/run/nginx.pid', 'worker_processes 2']
    }
}

grunt.registerTask("default", "nginx:start");

Keywords

FAQs

Package last updated on 24 Sep 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