bootstraponline / dart-worker-hello-world

Dart hello world for Cloudflare Workers

Repository from Github https://github.combootstraponline/dart-worker-hello-worldRepository from Github https://github.combootstraponline/dart-worker-hello-world

Dart hello world for Cloudflare Workers

Your Dart code in index.dart, running on Cloudflare Workers

In addition to Wrangler you will need to install Dart.

Wrangler

To generate using wrangler

wrangler generate projectname https://github.com/cloudflare/dart-worker-hello-world

Further documentation for Wrangler can be found here.

Dart

After installing Dart per the linked instructions above,

cd projectname

# run once to get dependencies
pub get

dart2js -O2 -o index.js index.dart

That will compile your code into index.js, after which you can run wrangler publish to push it to Cloudflare.

For more information on how Dart translates to JavaScript, see the docs for dart2js and the interop guide.

About

Dart hello world for Cloudflare Workers

License:Apache License 2.0


Languages

Language:Dart 100.0%