Coder Social home page Coder Social logo

igorminar / 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 40.99 MB

⛅️ The CLI for Cloudflare Workers®

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

License: Apache License 2.0

Shell 0.08% JavaScript 14.72% Python 0.06% C 0.10% PHP 0.09% Rust 0.14% TypeScript 81.51% CSS 1.26% COBOL 0.01% Makefile 0.04% HTML 1.89% Vue 0.09% WebAssembly 0.01%

workers-sdk's Introduction

⛅️ wrangler

This package is for wrangler v2.x, released first in May 2022. If you're looking for v1.x of the @cloudflare/wrangler package, visit https://www.npmjs.com/package/@cloudflare/wrangler / https://github.com/cloudflare/wrangler-legacy. v1 vs v2 comparison is at our docs site

wrangler is a command line tool for building Cloudflare Workers.

The Wrangler roadmap is tracked via GitHub Projects and can be found here.

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 publish it
npx wrangler publish 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 publish 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 publish

Publish 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

alankemp avatar cameron-robey avatar carmenpopoviciu avatar dario-piotrowicz avatar dependabot[bot] avatar electroid avatar geelen avatar github-actions[bot] avatar gregbrimble avatar huw avatar jacobmgevans avatar jahands avatar jbw1991 avatar jkup avatar jrf0110 avatar jspspike avatar matthewdavidrodgers avatar mrbbot avatar penalosa avatar petebacondarwin avatar rozenmd avatar sbquinlan avatar sidharthachatterjee avatar skirsten avatar skye-31 avatar threepointone avatar timabb031 avatar walshydev avatar warfields avatar willtemperley 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.