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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d96c8243b8cdd7572f8469d86df2e0cd6b07f94a10c7fa0a87bf5b76b7fb3750 |
|
MD5 | 9181b854a1febf84e049eb5f0058cda1 |
|
BLAKE2b-256 | 9d1f0a58d257c6eb1e487eb9a9ec777e78212bfc53cf9916108ee54b3855e338 |
Hashes for localstack_extension_miniflare-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d630497dd22abdff7377d2fe229cd3de14be50f08370e1263976b7f60103a66 |
|
MD5 | 65d8684a81d77c4302bceb693224d225 |
|
BLAKE2b-256 | 33acfce6b504aaaff053110fac94406060303eed2db19eb88de1d08239415655 |