Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1.58 KB

README.md

File metadata and controls

46 lines (35 loc) · 1.58 KB

Demo Server

This repository contains boilerplate code for a RESTful API based on Flask and Flask-RESTPlus.

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
  • 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/api/ using your browser.
  • The swagger can also be found in the demo_server directory as swagger.json
    • The swagger was automatically generated by flask-restplus
  • This swagger can be compiled and tested using RESTler.

Start trying the endpoints from the swagger API at your browser and you will see logs coming in the terminal where the server is running. Moreover, you should see coverage information produced in demo_server/coverage_stats.txt.