Skip to content

Express API for CRUD operations on DNS records configured on Cloudflare Name servers

Notifications You must be signed in to change notification settings

belphegor-s/dnsRecordManip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DNS Records Manipulation

Express API for CRUD operations on DNS records (Cloudflare Namservers via Cloudflare APIs)

Local setup

  • Make sure you have NodeJS installed v^16+
  • Clone the repo and install dependencies via npm i
  • Add environment variables in .env file at root of the project
    CLOUDFLARE_AUTH_TOKEN=<your_cloudflare_auth_token>
    ZONE_ID=<your_cloudflare_zone_id>
    AUTH_TOKEN=<your_auth_token> # for api endpoint authentication middleware
  • Build for production and fire up the server npm run build && npm start

Endpoints

GET: /api/getDNSRecords → For getting all the DNS Records configured on Cloudflare Nameserver

POST: /api/addDNSRecord → For adding a single DNS record

PUT: /api/updateDNSRecord → For updating a single DNS record

DELETE: /api/deleteDNSRecord → For deleting a single DNS record by passing an identifier

About

Express API for CRUD operations on DNS records configured on Cloudflare Name servers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published