Giter Club home page Giter Club logo

andrewkushnir / 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 42.23 MB

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

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

License: Apache License 2.0

Shell 0.09% JavaScript 12.97% Python 0.06% Perl 0.01% C 0.08% PHP 0.09% Scala 0.10% F# 0.57% Rust 0.12% Kotlin 0.02% Dart 0.02% TypeScript 81.28% CSS 1.06% COBOL 0.01% Makefile 0.04% HTML 1.68% Vue 0.08% Reason 0.02% WebAssembly 0.01% Mustache 1.68%

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.

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.

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.