How to use the cloudflare.createClient function in cloudflare

To help you get started, we’ve selected a few cloudflare examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DragonsInn / BIRD3 / node-lib / front-end / cloudflare_worker.js View on Github external
var ccf = (config.API.cloudflare.enable == "yes"
    ? require("cloudflare").createClient(config.API.cloudflare)
    : null
);
var ncf = require("node_cloudflare");
var debug = require("debug")("bird3:cloudflare");

module.exports = function(app) {
    // This is the local app instance, invoked before vhost.
    debug("BIRD3 CloudFlare Worker: Starting...");

    if(ccf!=null) {
        debug("BIRD3 CloudFlare Worker: CF client enabled!");
    }

    ncf.load(function(error, fs_error){
        if(error){
            throw error;
github danielpigott / cloudflare-cli / lib / cli.js View on Github external
cfcli.init = function (token, email) {
  cfcli.cloudflare = require('cloudflare').createClient({
    email: email,
    token: token
  });
};

cloudflare

The official TypeScript library for the Cloudflare API

Apache-2.0
Latest version published 4 months ago

Package Health Score

83 / 100
Full package analysis

Popular cloudflare functions