Skip to content

Nneji123/FastAPI-Serving-HTML-Example

Repository files navigation

How to serve HTML with FastAPI

This is a repository template for serving html with FastAPI. To use this template do the following:

1. Clone or fork this repository

2. Add your html pages or edit the ready-made pages in the templates folder.

3. Update the app.py file.

4. You can run the application locally by installing the requirements and running this command:

pip install -r requirements.txt
python -m uvicorn app:app --reload

You should be able to view your html pages on the local server.

An example has already been deployed and you can view it here: https://interesteval.herokuapp.com/