You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -97,7 +110,30 @@ Using [Poetry](https://python-poetry.org/) to manage your virtual environments w
97
110
- Required packages are python3.9 (that is what Vercel's runtime uses), `fastapi`, and `uvicorn`.
98
111
- Install whatever other dependencies you need from pypi using `poetry add package-name`
99
112
113
+
- Enter your virtual env with `poetry shell`
100
114
- Run `pnpm dev` or `npm dev`
115
+
- You should see both the usual SvelteKit server start as well as the unvicorn server (by default on `http://0.0.0.0:8000`) in the console.
116
+
117
+
## Deploying to Vercel
118
+
- At the moment this requires a tiny bit of extra labor besides just pushing to your repository. I believe this is because of the way Vercel looks for serverless functions, but I hope to make this a bit easier in the future.
119
+
120
+
- When you make changes to your python endpoints, you have to manually regenerate the `/api` folder by running:
@@ -174,9 +210,13 @@ Using [Poetry](https://python-poetry.org/) to manage your virtual environments w
174
210
175
211
```
176
212
177
-
## Caveats
213
+
### Backend Caveats
178
214
179
215
There are currently a few things that have to be worked around.
216
+
-`GET` endpoints are directly fed the parameters from the url, so when you define an endpoint
217
+
- All other endpoints are fed the body as a JSON. The recommended way to deal with this is to use a pydantic model and pass it as the singular input to the function.
0 commit comments