Code Monkey home page Code Monkey logo

workers-docs's Introduction

Cloudflare Workers Documentation

This project contains the static website content for the Cloudflare Workers documentation.

Install

Ensure you have the the following installed:

Preview

To test the content or static gatsby files locally, run:

npm install
npm run start

Your site is now running at http://localhost:8000!

Note: You'll also see a second link: http://localhost:8000/___graphql. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial.

You can now edit the .md (/src/content)files and the HTML files will be autogenerated in ./public.

Worker

To test the Worker logic serving these static files (i.e. anything in ./workers-site), run:

npm run worker-start

Build

To build all files to /public:

npm run build

To build all Worker files to worker-site/dist:

npm run worker-build

Test

To run test of the Workers script, run:

npm worker-test

What's inside

  1. /src: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template. src is a convention for β€œsource code”.

  2. gatsby-browser.js: This file is where Gatsby expects to find any usage of the Gatsby browser APIs (if any). These allow customization/extension of default Gatsby settings affecting the browser.

  3. gatsby-config.js: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. (Check out the config docs for more detail).

  4. gatsby-node.js: This file is where Gatsby expects to find any usage of the Gatsby Node APIs (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.

  5. gatsby-ssr.js: This file is where Gatsby expects to find any usage of the Gatsby server-side rendering APIs (if any). These allow customization of default Gatsby settings affecting server-side rendering.

Publishing

To publish to development environment (which is protected by access at dev.bigfluffycloudflare.com/workers) run:

npm run publish dev

Releasing

Releasing done through CI for whatever is on master. Ask Ashley Williams or Kristian Freeman for questions.

Contributing

This repo is overseen by the Workers Developer Experience team. Check out our contribution guide at CONTRIBUTING.md!

To contribute to templates see Template Contributing Guide.

workers-docs's People

Contributors

1000hz avatar a-robinson avatar adamschwartz avatar adaptive avatar ashleygwilliams avatar ashleymichal avatar benadam11 avatar bradyjoslin avatar cherwoo avatar conzorkingkong avatar everlastingbugstopper avatar explooosion avatar exvuma avatar gabbifish avatar gregbrimble avatar harrishancock avatar hturan avatar inikulin avatar jclee avatar kristianfreeman avatar mpint avatar nagpai avatar neynah avatar nodebotanist avatar rfreebern avatar rita3ko avatar steveklabnik avatar tenaciousdlg avatar xortive avatar xtuc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.