Socket
Socket
Sign inDemoInstall

cfmzmanager

Package Overview
Dependencies
302
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cfmzmanager

Cloudflare Manager is a Node.js package for managing DNS records and subdomains in Cloudflare.


Version published
Weekly downloads
2
decreased by-83.33%
Maintainers
1
Install size
20.5 MB
Created
Weekly downloads
 

Readme

Source

Cloudflare Manager

Cloudflare Manager is a Node.js package for managing DNS records and subdomains in Cloudflare.

Installation

To install Cloudflare Manager, use npm:

npm install cfmzmanager

Usage

const CloudflareManager = require("cfmzmananger");

const manager = new CloudflareManager();

// Add subdomain example.com
const payload = { domain: "example.com" };
manager
  .addSubdomain(payload)
  .then((responseData) => {
    console.log(responseData); // Response data from Cloudflare API
  })
  .catch((error) => {
    console.error(error); // Error if DNS record creation failed
  });

Configuration

Before using Cloudflare Manager, make sure to set up a config.json file with your Cloudflare credentials:

{
  "Cloudflare": {
    "email": "your_email@example.com",
    "apiKey": "your_api_key",
    "zoneId": "your_zone_id",
    "ipAddress": "your_server_ip_address"
  }
}

API

Detail usage of the function Cfmzmanager for you better modified the package.

new CloudflareManager()

Creates a new instance of CloudflareManager.

addSubdomain(payload)

Adds a subdomain to Cloudflare DNS records.

  • payload (Object): An object containing the domain name.
    • domain (String): The domain name to add.

Returns a Promise that resolves with the response data from the Cloudflare API.

License

This project is licensed under the GPL LICENSE - see the LICENSE file for details.

Keywords

FAQs

Last updated on 21 Mar 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc