From 23b6fbf3cc3b8e50fea9718e071be7430db6a944 Mon Sep 17 00:00:00 2001 From: chris48s Date: Thu, 5 Sep 2024 14:46:31 +0100 Subject: [PATCH] add command to start the api and a little bit of docs --- Pipfile | 1 + README.md | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index 449d13a..a8246b6 100644 --- a/Pipfile +++ b/Pipfile @@ -56,3 +56,4 @@ collectstatic = "python manage.py collectstatic -c --noinput" pytest = "pytest" coveralls = "coveralls" migratedb = "python manage.py migrate --noinput" +start = "bash -c \"(cd api_endpoints/v1_postcode_lookup/ && uvicorn app:app --reload)\"" diff --git a/README.md b/README.md index 754350b..60bbc80 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,18 @@ This section assumes a working python 3.8 environment with Pipenv installed. * `cp ec_api/settings/local.py.example ec_api/settings/local.py` -* Install Python dependencies: `pipenv install --dev` +* Install Python dependencies: + * `pipenv install --dev` + * `pip install -r api_endpoints/v1_postcode_lookup/requirements.txt` * Run the test suite: `pytest` * Run lint checks: `ruff .` * Auto-format: `ruff format .` +## Run application + +- Frontend: `./mange.py runserver` +- API: `pipenv run start` + ## Pre-commit Using a pre-commit hook is suggested when working on this project to catch