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
221
221
4. Duplicate ` src/.env.sample` and name to ` .env` .
222
222
223
223
5. 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
+ ` ` `
224
229
225
- 6 . Run the local server:
230
+ 7 . Run the local server:
226
231
227
232
` ` ` shell
228
233
python -m uvicorn " api.main:create_app" --factory --reload
229
234
` ` `
230
235
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.
232
237
233
- 8. Enter your message in the box.
238
+ 9. Enter your message in the box.
234
239
< /details>
235
240
236
241
# ## Deploying Steps
Original file line number Diff line number Diff line change @@ -272,3 +272,8 @@ def on_starting(server):
272
272
worker_class = "uvicorn.workers.UvicornWorker"
273
273
274
274
timeout = 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