-
Notifications
You must be signed in to change notification settings - Fork 2
Set Up
This Python repo uses venv. To set up venv, go to the repo root directory and enter:
python -m venv ./venv
This command works on Windows, Mac and Linux (although you may need to use python3
for your platform).
Depending on your platform, you'll need to activate your virtual environment.
In the repo root directory, enter these commands in PowerShell:
cd .\venv\Scripts\
.\Activate.ps1
You'll also need to install docker.
We recommend using chocolately to install the most current version of the Docker Desktop package.
Install the latest docker using snap:
sudo snap install docker
Once you've installed the packages you need using venv, and have docker installed as well, you can run the app locally on port 8080 using the following Bash commands from the project root:
sudo docker build -t versa .
sudo docker run -it --rm --name versa-app -p 8080:8080 versa
Then you can run the browser app to consume the API endpoints defined in it. Currently only POST /party and GET /parties are defined.
To test the API, you can use curl:
curl http://localhost:8080/party
curl http://localhost:8080/parties
Storage is all in-memory at this point, nothing persisted to or read from disk/DB, so for the time being, you'll need to call POST methods to put data in before getting data out.