Skip to content

Conversation

@risha-bit
Copy link

Added main.py as a simple FastAPI example demonstrating a basic GET endpoint.

The application defines a single route ("/") that returns a JSON message:
{
"message": "Hello, FastAPI!"
}

This serves as a quick-start example for beginners to understand how to:

  • Initialize a FastAPI app
  • Define a GET endpoint
  • Run it locally using Uvicorn

To run this example:

  1. Install dependencies:
    pip install fastapi uvicorn

  2. Run the app:
    uvicorn main:app --reload

  3. Open in your browser:
    http://127.0.0.1:8000/

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.

1 participant