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.2: Pin wrangler version to fix hanging miniflare invocations; fix encoding headers for invocation responses0.1.1: Adapt for LocalStack v3.00.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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file localstack_extension_miniflare-0.1.3.tar.gz.
File metadata
- Download URL: localstack_extension_miniflare-0.1.3.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af3aed8771aacb49b0e59613df7da0f613fa70826acb78ee790b85c36af86bf5
|
|
| MD5 |
3784edd2e1cbbfd253590aded66c9a3c
|
|
| BLAKE2b-256 |
113ee117d03b4962ee1e248755192af8606793a44d84c13904a8310bdbb1e040
|
File details
Details for the file localstack_extension_miniflare-0.1.3-py3-none-any.whl.
File metadata
- Download URL: localstack_extension_miniflare-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a57a9530bf66b86c2152b00d1bbe440feae5165eb01995bc1dbcfd838af639de
|
|
| MD5 |
2d0988bd81f63fb79682e6ac84429360
|
|
| BLAKE2b-256 |
6b1360802d6203b95da155a16ab212fca953a92ae14d61954cfada85c0d2cbc1
|