This guide assumes that you are using a linux system. The MountainPeak is based on a FastAPI, postgreSql python stack.
-
Make sure Docker and docker-compose is installed on your system
-
Download this repository.
-
git clone https://github.com/julienCozo/mpeak.git && cd mpeak
-
On the command line you can build the image and start the container:
docker-compose up --build
-
Open http://localhost:8000/ in your browser. You should be greated by a welcome message
FastAPI include powerfull tool to test API. Let use Swagger UI which is available at http://localhost:8000/docs/
Here a list of implemented routes with examples
List all peak with classic pagination implemented (skip and limit)
List peak in a bouncing box with query params max_lat min_lat max_lon min_lon
Read a peak (GET)
Update a peak (PUT)
Delete a Peak (DELETE)
Create a peak (POST)
Peak schema is { "name": "string", "lat": 0, "lon": 0, "altitude": 0, "id": 0 }
Create schema is { "name": "string", "lat": 0, "lon": 0, "altitude": 0 }