$ cd path/to/where/you/want/it
$ git clone https://github.com/wiggoen/powerplant-coding-challenge.git
REST: REpresentational State Transfer
API: Application Programming Interface
JSON: JavaScript Object Notation
$ cd powerplant-coding-challenge
$ python3 -m venv venv
$ source venv/bin/activate
$ pip3 install -r requirements.txt
$ python3 app.py
In a new terminal:
$ cd powerplant-coding-challenge
Format of CURL request
$ curl --request POST --header "Content-Type: application/json" --data "@path/to/filename.json" http://localhost:port/endpoint
-X or --request
-H or --header
For example:
$ curl -X POST -H "Content-Type: application/json" --data "@example_payloads/payload1.json" http://127.0.0.1:8888/productionplan
CTRL + C
$ deactivate