Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 ""
Expand Down
8 changes: 4 additions & 4 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```

Expand All @@ -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
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion fastly_compute/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down