File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -221,16 +221,21 @@ You can optionally use a local development server to test app changes locally. M
2212214. Duplicate ` src/.env.sample` and name to ` .env` .
222222
2232235. Fill in the environment variables in ` .env` .
224+
225+ 6. (Optional) If you have change in ` gunicorn.conf.py` , execute:
226+ ` ` ` shell
227+ python gunicorn.conf.py
228+ ` ` `
224229
225- 6 . Run the local server:
230+ 7 . Run the local server:
226231
227232 ` ` ` shell
228233 python -m uvicorn " api.main:create_app" --factory --reload
229234 ` ` `
230235
231- 7 . Click ' http://127.0.0.1:8000' in the terminal, which should open a new tab in the browser.
236+ 8 . Click ' http://127.0.0.1:8000' in the terminal, which should open a new tab in the browser.
232237
233- 8. Enter your message in the box.
238+ 9. Enter your message in the box.
234239< /details>
235240
236241# ## Deploying Steps
Original file line number Diff line number Diff line change @@ -272,3 +272,8 @@ def on_starting(server):
272272worker_class = "uvicorn.workers.UvicornWorker"
273273
274274timeout = 120
275+
276+ if __name__ == "__main__" :
277+ print ("Running initialize_resources directly..." )
278+ asyncio .run (initialize_resources ())
279+ print ("initialize_resources finished." )
You can’t perform that action at this time.
0 commit comments