Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minimal Python API deployable with Next/Vercel #33

Merged
merged 2 commits into from
Nov 24, 2023
Merged

Conversation

taesungh
Copy link
Member

  • Create apps/api to hold API files which are copied to apps/site during Vercel build to be deployed as a Serverless Function
  • Include FastAPI/Uvicorn handler and basic VS Code setup for Python
  • Specify api/index.py as Vercel Serverless Function in vercel.json

- Create `apps/api` to hold API files which are copied to `apps/site`
  during Vercel build to be deployed as a Serverless Function
- Include FastAPI/Uvicorn handler and basic VS Code setup for Python
- Specify `api/index.py` as Vercel Serverless Function in `vercel.json`
Copy link
Contributor

github-actions bot commented Nov 24, 2023

Deploy preview for irvinehacks-site-2024-sanity ready!

Name Sanity Studio
Preview Visit Preview
Commit 84861ce

Copy link
Contributor

github-actions bot commented Nov 24, 2023

Deploy preview for irvinehacks-site-2024 ready!

Name IrvineHacks 2024 Site
Preview Visit Preview
Commit 84861ce

Copy link
Contributor

@samderanova samderanova left a comment

Choose a reason for hiding this comment

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

Thanks for getting this done! A few things:

apps/api/README.md Show resolved Hide resolved
apps/site/copy-api.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@samderanova samderanova left a comment

Choose a reason for hiding this comment

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

There is a conflict with between Next and Vercel where accessing /api results in an infinite redirect but other routes (i.e. /api/docs) seem to work. We can resolve this in a separate issue.

Please squash during merge.

@taesungh taesungh merged commit 721bac3 into main Nov 24, 2023
2 checks passed
@taesungh taesungh deleted the setup/api branch November 28, 2023 06:21
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