smartnginx/README.md

31 lines
893 B
Markdown
Raw Normal View History

2016-07-06 01:15:47 +00:00
# smartnginx
2016-07-06 04:33:38 +00:00
control nginx from node, TypeScript ready
## Status
2016-07-06 04:33:38 +00:00
[![build status](https://gitlab.com/pushrocks/smartnginx/badges/master/build.svg)](https://gitlab.com/pushrocks/smartnginx/commits/master)
2016-07-25 00:02:24 +00:00
## Features
- easy reverse configuration
- automatic letsencrypt DNS01 challenge based ssl cert generation
- automatic nginx process handling zero-downtime config reloading
- works in Docker environements
2016-07-25 00:02:24 +00:00
2016-07-06 04:33:38 +00:00
## Usage
2016-07-06 04:33:38 +00:00
We recommend the use of TypeScript! :)
```typescript
import * as smartnginx from 'smartnginx';
const smartnginxInstance = new smartnginx.SmartNginx();
myNginxHost = new smartnginx.NginxHost({
hostName: 'some.example.com',
type: 'reverseProxy',
destination: '192.192.192.192' // some destination IP
2016-07-06 04:33:38 +00:00
});
myNginxConfig.addZone(myNginxZone); // adds the zone to the config
2016-07-25 00:02:24 +00:00
myNginxConfig.deploy(); // deploys the referenced NginxConfig and gracefully reloads it
```