nginx-vir - v0.0.1

nginx-vir

A package for scripting some Nginx functionality.

See the docs: https://electrovir.github.io/nginx-vir

npm i nginx-vir

Here's an example script that can be used to setup a new Nginx website with self-signed SSL certificates for SSL:

import {createSelfSignedHttpsNginxSite} from 'nginx-vir';

await createSelfSignedHttpsNginxSite({
enabled: true,
locations: [
{
type: 'location',
uri: '/',
children: [
{
type: 'proxy_pass',
url: 'http://localhost:3000',
},
],
},
],
siteName: 'my-site',
});