bunnycdn-node
BunnyCDN node.
A simple utility for working with bunnycdn's APIs
This was initially planned to be a simple utility for us to use to update js files on Bunny's storage platform and then bust their cache after a deployment.
Installation
$ npm install bunnycdn-node
set the following environment variables
- BUNNY_API_KEY
- BUNNY_STORAGE_API_KEY
Usage
import
;...const bunny = ;
Storage
All files in Storage Zone
const files: StorageZoneFile = await bunnystorage;
Contents of specific file
const fileContents: string = await bunnystorage;
Update Contents of specific file
bunnystorage;
Delete specific file
bunnystorage;
Bunny API
Get Billing
const billing: Billing = await bunny;
Get Statistics
const stats : Statistic = await bunny;
Purge File Cache
bunny;
HardUpdate File (Update and Purge)
bunny;