Add FastAPI entrypoint with root and health endpoints#18
Conversation
Agent-Logs-Url: https://github.com/pragan333/expo/sessions/51756363-e3dd-4ccc-acc5-b5b8045311fc Co-authored-by: pragan333 <220984917+pragan333@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d33af81f09
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,13 @@ | |||
| from fastapi import FastAPI | |||
There was a problem hiding this comment.
Declare FastAPI dependency for the new API entrypoint
This entrypoint imports fastapi, but the repository does not define Python dependencies (requirements.txt, pyproject.toml, or Pipfile) for Vercel/Python builds, so deployments that include this function will fail to import on startup with ModuleNotFoundError: fastapi unless the runtime happens to preinstall it. Since this commit introduces the import, it also needs the corresponding dependency manifest.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Adds a new FastAPI application entrypoint intended to expose basic service status endpoints.
Changes:
- Introduces a FastAPI app in
api/index.py - Adds
GET /andGET /healthendpoints returning{"status": "ok"}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| from fastapi import FastAPI | ||
|
|
||
| app = FastAPI() |
There was a problem hiding this comment.
This entrypoint depends on fastapi, but the repo currently has no Python dependency manifest (no requirements.txt/pyproject.toml/lockfile or install instructions). As-is, this module won’t be runnable in CI/deploy without adding and pinning the FastAPI (and ASGI server, e.g. uvicorn) dependencies and documenting how the app should be started (e.g. the expected uvicorn api.index:app command).
Adds
api/index.pyas the FastAPI application entrypoint.Changes
api/index.py— new FastAPI app with two endpoints:GET /→{"status": "ok"}GET /health→{"status": "ok"}