Home

Awesome

Cloudflare Workers Codeship Example

Cloudflare Workers allow you to write JavaScript which runs on all of Cloudflare's 160+ global data centers. This repo is an example of how to combine multiple files and dependencies to create a Worker using the Webpack build tool.

The actual Worker replaces the content of your site with a Worker which returns the current time in the timezone of the caller's choice.

This project is adapted from Cloudflare's Webpack example.

Dependencies

Instructions

To open the Workers preview with the built Worker:

Automated Deployment

You can use Codeship to automatically update your Worker. Just add the following environment variables to your Codeship environment:

Codeship will automatically update your worker in Cloudflare when the master branch is built using the script at scripts/deploy.