…
|
||
---|---|---|
.. | ||
demo_server | ||
Dockerfile | ||
README.md | ||
requirements.txt | ||
swagger.json |
README.md
Demo Server
This repository contains code for a simple blog service, based on FastAPI.
Installation
Downloading Python
Install python 3.8.2 for your appropriate OS from https://www.python.org/downloads/
Setting up Python environment
- Get into the server's directory:
cd <path_to_rest.fuzzing>/demo_server
- Create a virtual environment:
python -m venv venv
- Activate virtual environment (Linux):
source venv/bin/activate
- Activate virtual environment (Windows):
venv\Scripts\activate
- Activate virtual environment (Linux):
- Get dependencies:
pip install -r requirements.txt
Launch Demo Server
Activate virtual environment
Follow instructions above to activate virtual environment
Start demo server at one teminal
python demo_server/app.py
- Make sure you execute all the above from the base directory of demo_server (the same directory where this README lives in.)
Swagger
- The interactive swagger specification interface will be available at http://localhost:8888/docs using your browser.
- The OpenAPI specification can also be found in the demo_server directory as swagger.json
- The spec was automatically generated by FastAPI.
- This swagger.json can be compiled and tested using RESTler.
Start trying the endpoints from the interactive API docs at your browser and you will see logs coming in the terminal where the server is running.