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.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
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
File details
Details for the file localstack_extension_miniflare-0.1.2.tar.gz
.
File metadata
- Download URL: localstack_extension_miniflare-0.1.2.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99b5eebd822ccdcce9d476782d19dbf36c0ed94467f3e3ab9b4111f8c7b3a48d |
|
MD5 | 107be90267c68a9c47d7d7247e102fcb |
|
BLAKE2b-256 | 23ffd42e39a9d37ff0553d764ed75db4a6e3a89c79fa7c496aa66b8c49b763c2 |
File details
Details for the file localstack_extension_miniflare-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: localstack_extension_miniflare-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2436f1e209d8643c454802fdb0229c040df613266c43b90c07defa625f4e9ea3 |
|
MD5 | 355adb4c3f5e81806065f886339fe8a0 |
|
BLAKE2b-256 | c26c489280b2f94ecc04750a61f78e91b0c985039471283a181bd0a52c46495d |