🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@bunpmjs/cloudflareapi

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bunpmjs/cloudflareapi

CloudFlare Api for managing DNS-Records...

0.0.2
latest
npm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

cloudflareapi

ENV (env variables)

  • CLOUDFLARE_TOKEN= Make sure your api token is set to perform the requests to the account to the endpoint

Usage

Initialization

    // the token can be set in the .env or in the constructor
    const cfApi = new cloudflare({
        token: "<Token>"
    });

DNSrecords management

   cfApi.DNSRecords.update({
       zone_id: "<zone_id>",
       set: {
           current_name: "<current_record_name>",
           name: "<new_name || current_record_name>",
           proxied: true | false,
           type: "record type"
       }
   })

FAQs

Package last updated on 01 Jan 2024

Did you know?

Socket

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