@@ -0,0 +1,51 @@
|
||||
# FastAPI Starter
|
||||
|
||||
Deploy your [FastAPI](https://fastapi.tiangolo.com/) project to Vercel with zero configuration.
|
||||
|
||||
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/fastapi&template=fastapi)
|
||||
|
||||
_Live Example: https://vercel-plus-fastapi.vercel.app/_
|
||||
|
||||
Visit the [FastAPI documentation](https://fastapi.tiangolo.com/) to learn more.
|
||||
|
||||
## Getting Started
|
||||
|
||||
Install the required dependencies:
|
||||
|
||||
```bash
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install .
|
||||
```
|
||||
|
||||
Or, if using [uv](https://docs.astral.sh/uv/):
|
||||
|
||||
```bash
|
||||
uv sync
|
||||
```
|
||||
|
||||
|
||||
## Running Locally
|
||||
|
||||
Start the development server on http://0.0.0.0:5001
|
||||
|
||||
```bash
|
||||
python main.py
|
||||
# using uv:
|
||||
uv run main.py
|
||||
```
|
||||
|
||||
When you make changes to your project, the server will automatically reload.
|
||||
|
||||
## Deploying to Vercel
|
||||
|
||||
Deploy your project to Vercel with the following command:
|
||||
|
||||
```bash
|
||||
npm install -g vercel
|
||||
vercel --prod
|
||||
```
|
||||
|
||||
Or `git push` to your repository with our [git integration](https://vercel.com/docs/deployments/git).
|
||||
|
||||
To view the source code for this template, [visit the example repository](https://github.com/vercel/vercel/tree/main/examples/fastapi).
|
||||
Reference in New Issue
Block a user