diff --git a/Makefile b/Makefile index 007486d..88ab02e 100644 --- a/Makefile +++ b/Makefile @@ -9,10 +9,10 @@ BUILD_DIR := build EXAMPLES_DIR := examples # Define all available examples (add new ones here) -EXAMPLES := wit-bottle flask-app game-of-life +EXAMPLES := bottle-app flask-app game-of-life # Default example for serve target -EXAMPLE ?= wit-bottle +EXAMPLE ?= bottle-app WASM_FILE := $(BUILD_DIR)/$(EXAMPLE).composed.wasm TARGET_WORLD := fastly:compute/service @@ -47,7 +47,7 @@ $(WASILESS_WASM): $(BUILD_DIR): mkdir -p $(BUILD_DIR) -# Serve the specified example (default: wit-bottle) +# Serve the specified example (default: bottle-app) serve: $(WASM_FILE) @echo "Serving $(EXAMPLE) example on http://127.0.0.1:7676" $(VICEROY) serve $(WASM_FILE) @@ -99,7 +99,7 @@ help: @echo "" @echo "Examples:" @echo " make # Build all examples" - @echo " make serve # Serve wit-bottle example" + @echo " make serve # Serve bottle-app example" @echo " make serve EXAMPLE=flask-app # Serve flask-app example" @echo " make build/flask-app.wasm # Build specific example" @echo "" diff --git a/examples/README.md b/examples/README.md index 07601c6..f839ea4 100644 --- a/examples/README.md +++ b/examples/README.md @@ -4,7 +4,7 @@ This directory contains example applications demonstrating different approaches ## Available Examples -### `wit-bottle.py` +### `bottle-app.py` - **Framework**: Bottle (lightweight WSGI framework) - **Features**: Basic routing, JSON responses, WIT API integration - **Use Case**: Simple services, proof-of-concept applications @@ -22,13 +22,13 @@ A server-side implementation of Conway’s Game of Life, with a server round tri ### Build a Specific Example ```bash make build/flask-app.wasm # Build Flask example -make build/wit-bottle.wasm # Build Bottle example +make build/bottle-app.wasm # Build Bottle example make build/game-of-life.wasm # Build Conway's Game of Life example ``` ### Serve an Example ```bash -make serve # Serve default (wit-bottle) +make serve # Serve default (bottle-app) make serve EXAMPLE=flask-app # Serve Flask example ``` @@ -44,7 +44,7 @@ make list-examples ## Testing Examples -The integration tests use the default example (wit-bottle). To test other examples: +The integration tests use the default example (bottle-app). To test other examples: ```bash # Update the test to use a different example diff --git a/examples/wit-bottle.py b/examples/bottle-app.py similarity index 100% rename from examples/wit-bottle.py rename to examples/bottle-app.py diff --git a/fastly_compute/testing.py b/fastly_compute/testing.py index 8243243..a90a4b7 100644 --- a/fastly_compute/testing.py +++ b/fastly_compute/testing.py @@ -50,7 +50,7 @@ def test_my_endpoint(self): """ REQUEST_TIMEOUT = 10 - WASM_FILE = "build/wit-bottle.composed.wasm" # Default to the main example + WASM_FILE = "build/bottle-app.composed.wasm" # Default to the main example server: ViceroyServer = None # Will be set by the fixture @staticmethod