LocalStack Extension: Miniflare
Project description
Miniflare LocalStack extension (experimental)
This extension makes Miniflare (dev environment for Cloudflare workers) available directly in LocalStack!
⚠️ Please note that this extension is experimental and currently under active development.
Installing
localstack extensions install "git+https://github.com/localstack/localstack-extensions/#egg=localstack-extension-miniflare&subdirectory=miniflare"
How to use
To publish the sample application to Miniflare running in LocalStack, we can use the wrangler
CLI with the following environment variables for local dev mode:
export CLOUDFLARE_API_TOKEN=test
export CLOUDFLARE_API_BASE_URL=http://localhost:4566/miniflare
wrangler publish
Note: if you're having troubles with this configuration, e.g., seeing "Fetch failed" error messages on wrangler publish
, try using this API endpoint instead:
export CLOUDFLARE_API_BASE_URL=https://localhost.localstack.cloud:4566/miniflare
Once deployed, the Cloudflare worker can be easily invoked via curl
:
$ curl http://hello.miniflare.localhost.localstack.cloud:4566/test
Hello World!
Change Log
0.1.0
: Upgrade to Miniflare 3.00.0.1
: Initial version.
License
The cloudflare/miniflare
package and related tooling is licensed under the MIT License.
The code of this LocalStack Extension is published under the Apache 2.0 license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for localstack-extension-miniflare-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00deea2b1078f7493fa8a6250f970808e974c4782c8b30b8ce8e283a6b4953a4 |
|
MD5 | 9db2fec0a58938f5cb62043bfe8ed243 |
|
BLAKE2b-256 | b576b00c516b7e973cd289d02e5502a747317745a9033d4b7f6ffb34f43a3c86 |
Hashes for localstack_extension_miniflare-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 361c8cef8fd4c3e9d5a36ff656520a6f085d313f5de9b0e45e1e9463dd459dcf |
|
MD5 | 2772d512a634f944be34536387e8ac5b |
|
BLAKE2b-256 | 5c194762eb63153ae9fe9c25ee85446015290d5ae8b084d5fd15cfbef44aa613 |