bind-zone-manager

1.0.0 • Public • Published

bind-zone-manager

npm version

Nodejs module for Parse and Generate zoneFile of Bind DNS. Manager system

Installation

Use the npm for install

npm install bind-zone-manager --save

Support

The module developed for Bind9 system and support basic zone files options.

Usage

/*
   import module
*/
const ZoneManager = require('bind-zone-manager') 
 
/* 
   generate new manager without zone File path if you want work
   with zoneFile follow `new ZoneManager(<ZoneFilePath>)` 
*/
const manager = new ZoneManager() 
 
/*
   Parse raw data, if you used <ZoneFilePath> for generate manager
   You do not need to define {RawData} in Parse function
*/
var parsedData = manager.Parse({RawData}) 
 
/*
   generate {custom-list} to string and you can write it to zone
   file or anything you want to do with it
*/
var generatedData = manager.Generate({custom-list})
 
{RawData}
zone "test.com" {
   type master;
   file "record-db-file-path";
};

zone "test2.com" {
   type master;
   file "record-db-file-path";
};
{custom-list}
[
   { 
     Host:"test.com",
     Type:"master",
     DbFilePath:"record-db-file-path"
   },
   { 
     Host:"test2.com",
     Type:"master",
     DbFilePath:"record-db-file-path"
   }
]

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Package Sidebar

Install

npm i bind-zone-manager

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

8.06 kB

Total Files

5

Last publish

Collaborators

  • ahmadyazdanii