smartnginx/README.md

20 lines
668 B
Markdown
Raw Permalink 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
[![build status](https://gitlab.com/pushrocks/smartnginx/badges/master/build.svg)](https://gitlab.com/pushrocks/smartnginx/commits/master)
## Usage
We recommend the use of TypeScript! :)
```typescript
import * as smartnginx from "smartnginx";
myNginxConfig = new smartnginx.NginxConfig();
myNginxZone = new smartnginx.NginxZone({
zoneName:"some.example.com",
type:"reverseProxy",
destination:"192.192.192.192" // some destination IP
});
myNginxConfig.addZone(myNginxZone); // adds the zone to the config
myNginxConfig.deploy(); // deploys the referenced NginxConfig and restarts nginx
```