Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 1.3 KB

README.md

File metadata and controls

64 lines (43 loc) · 1.3 KB

Restify Backend

REST API Endpoint Spec

Local Development

Setup

When running on Linux, the following steps can simply be replaced by ./startup.sh in the project root.

  1. Create python virtual environment

    python3.10 -m venv .venv

    This will create a virtual environment at ./.venv.

  2. Activate the virtual environment in Linux/UNIX:

    source ./.venv/bin/activate

    Or in Windows:

    .venv\Scripts\activate.bat
  3. Install required python packages:

    pip install -r requirements.txt
  4. Enter Django project and perform database migrations:

    cd django_restify
    python3.10 manage.py makemigrations
    python3.10 manage.py migrate

Running

When running on Linux, the following steps can simply be replaced by ./run.sh in the project root.

  1. Activate the Python virtual environment.
  2. Run the development server:
    python3.10 ./manage.py runserver

You should be able to visit http://127.0.0.1:8000/api/ and see the following JSON response:

{
    "hello": "world"
}

All additional API endpoints will reside under the /api/ path.