Skip to content

fasterize/darkstar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a9cb003 · Jan 6, 2021

History

18 Commits
Aug 3, 2016
Dec 18, 2020
Dec 18, 2020
Aug 3, 2016
Aug 3, 2016
Jan 6, 2021
Jul 26, 2019
Jul 26, 2019
Aug 3, 2016
Dec 15, 2020
Jul 26, 2019
Nov 16, 2020
Nov 16, 2020
Aug 3, 2016
Jul 26, 2019

Repository files navigation

Darkstar

Darkstar is an API to flush multiple CDN.

Usage example

Flush KeyCDN cache:

curl -v -X DELETE http://localhost:9080/v1/caches/keycdn/zones/${FASTERIZE_CONFIG_ID} \
  -H Content-Type:application/json \
  --data '{"authorizationToken": "${FASTERIZE_API_KEY}"}'

Current available CDN : KeyCDN, CloudFront, Incapsula and Fastly.

Setup

Install tools:

npm install -g typescript gulp-cli typings

Install dependencies:

typings install
npm install

Release

  • Create a folder named after the last commit SHA containing the projet (for instance folder c770266609c751c9759451b37ba5f736d4f9862b)
 tmp_folder
  > c770266609c751c9759451b37ba5f736d4f9862b
    > project files
  • Save this folder in an tar archive
tar czf darkstar_c770266609c751c9759451b37ba5f736d4f9862b.tgz -C tmp_folder .
  • release the file in files01-misc.fstrz.net:~/var/www/files/warp

Run it

Start Darkstar:

gulp start

Run tests

Run tests:

gulp test

Continuously run tests:

gulp watch-test

API Documentation

When started, go to http://localhost:9080/doc