Skip to content

Adds minimal example of http_server#1514

Merged
charlesfrye merged 4 commits intomainfrom
charlesfrye/http_server
Feb 27, 2026
Merged

Adds minimal example of http_server#1514
charlesfrye merged 4 commits intomainfrom
charlesfrye/http_server

Conversation

@charlesfrye
Copy link
Copy Markdown
Collaborator

@charlesfrye charlesfrye commented Feb 27, 2026

This PR completes the work begun in #1512 by adding a minimal HTTP Server example -- without the sticky routing, with an explanation of regions and more detail on 503s.

It's a simple file server from the Python stdlib and is tested by querying for the text of the file itself.

Type of Change

  • New example for the GitHub repo
    • New example for the documentation site (Linked from a discoverable page, e.g. via the sidebar in /docs/examples)

Monitoring Checklist

  • Example is configured for testing in the synthetic monitoring system, or lambda-test: false is provided in the example frontmatter and I have gotten approval from a maintainer
    • Example is tested by executing with modal run, or an alternative cmd is provided in the example frontmatter (e.g. cmd: ["modal", "serve"])
    • Example is tested by running the cmd with no arguments, or the args are provided in the example frontmatter (e.g. args: ["--prompt", "Formula for room temperature superconductor:"]
    • Example does not require third-party dependencies besides fastapi to be installed locally (e.g. does not import requests or torch in the global scope or other code executed locally)

Documentation Site Checklist

Content

  • Example is documented with comments throughout, in a Literate Programming style
  • All media assets for the example that are rendered in the documentation site page are retrieved from modal-cdn.com

Build Stability

  • [ ] Example pins all dependencies in container images

Here, we are documenting a top-level Modal feature using only Modal and the Python stdlib in the remote container and locally, so we don't pin dependencies at all. This should "never" break unless something else is broken.


Open with Devin

@charlesfrye charlesfrye requested a review from molocule February 27, 2026 01:08
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@charlesfrye
Copy link
Copy Markdown
Collaborator Author

@prbot approve

Copy link
Copy Markdown

@modal-pr-review-automation modal-pr-review-automation bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved 👍. @molocule will follow-up review this.

@charlesfrye charlesfrye merged commit d347fbf into main Feb 27, 2026
6 checks passed
@charlesfrye charlesfrye deleted the charlesfrye/http_server branch February 27, 2026 01:15
@shababo
Copy link
Copy Markdown
Collaborator

shababo commented Feb 27, 2026

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants