Coder Social home page Coder Social logo

lo236816 / workers-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudflare/workers-sdk

0.0 0.0 0.0 55.87 MB

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®

Home Page: https://developers.cloudflare.com/workers/

License: Apache License 2.0

Shell 0.07% JavaScript 11.33% Python 0.04% Perl 0.01% C 0.06% PHP 0.06% Scala 0.07% F# 0.41% Rust 0.09% Kotlin 0.01% Dart 0.01% TypeScript 84.87% CSS 0.81% COBOL 0.01% Makefile 0.03% Cap'n Proto 0.79% HTML 1.26% Handlebars 0.02% Vue 0.06% Reason 0.01%

workers-sdk's Introduction

⛅️ Home to wrangler, the CLI for Cloudflare Workers®, as well as other tools for interacting with Workers

This monorepo contains:

  • wrangler-devtools Cloudflare's fork of Chrome DevTools for inspecting your local or remote Workers
  • templates Templates & examples for writing Cloudflare Workers
  • wrangler A command line tool for building Cloudflare Workers.
  • pages-shared Used internally to power Wrangler and Cloudflare Pages. It contains all the code that is shared between these clients.
  • C3 A CLI for creating and deploying new applications to Cloudflare.

Wrangler and the workers-sdk is developed in the open on GitHub, and you can see what we're working on in GitHub Issues, as well as in our workers-sdk GitHub Project board. If you've found a bug or would like to request a feature, please file an issue!

Quick Start

# Make a javascript file
echo "export default { fetch() { return new Response('hello world') } }" > index.js
# try it out
npx wrangler dev index.js
# and then deploy it
npx wrangler deploy index.js --name my-worker --latest
# visit https://my-worker.<your workers subdomain>.workers.dev

Create a Project

# Generate a new project
npx wrangler init my-worker
# try it out
cd my-worker && npm run start
# and then deploy it
npm run deploy

Installation:

$ npm install wrangler --save-dev

Commands

wrangler init [name]

Creates a Worker project. For details on configuration keys and values, refer to the documentation.

wrangler dev

Start a local development server, with live reloading and devtools.

wrangler deploy

Deploys the given script to the worldwide Cloudflare network.

For more commands and options, refer to the documentation.

Pages

wrangler pages dev [directory] [-- command]

Either serves a static build asset directory, or proxies itself in front of a command.

Builds and runs functions from a ./functions directory or uses a _worker.js file inside the static build asset directory.

For more commands and options, refer to the documentation or run wrangler pages dev --help.

Documentation

For the latest Wrangler documentation, click here.

Contributing

Refer to the CONTRIBUTING.md guide for details.

workers-sdk's People

Contributors

1000hz avatar admah avatar cameron-robey avatar carmenpopoviciu avatar cherry avatar dario-piotrowicz avatar dependabot[bot] avatar edevil avatar electroid avatar elithrar avatar geelen avatar github-actions[bot] avatar gregbrimble avatar jacobmgevans avatar jahands avatar jculvey avatar jrf0110 avatar jspspike avatar lrapoport-cf avatar matthewdavidrodgers avatar mrbbot avatar penalosa avatar petebacondarwin avatar ramideas avatar rozenmd avatar sidharthachatterjee avatar skye-31 avatar threepointone avatar walshydev avatar workers-devprod 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.