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.2.2
  • latest
  • 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 - required

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

prefix string - optional

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

globals string - optional

Sets global directives. Further Information can be found here.

test string - optional

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

useSudo boolean - optional

Runs nginx with sudo. Useful if you want to run it on port 80.

Paths

grunt-nginx supports both absolute and relative paths. Like most grunt plugins, relative paths are with respect to the Gruntfile.js gruntfile.

Example

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

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

Keywords

FAQs

Package last updated on 04 Jul 2014

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