Response to Intern Code Test
-
Configure database settings in
settings.py
"db_config": { "host": "localhost", "dbname": "code-test", "user": "intern", "password": "password101" }
-
Install requirements
pip install -r requirements.txt
-
Run
app.py
python app.py
Should print:
127.0.0.1 - - [00/Apr/2018 09:00:00] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [00/Apr/2018 09:00:00] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [00/Apr/2018 09:00:00] "POST /items HTTP/1.1" 200 - 127.0.0.1 - - [00/Apr/2018 09:00:00] "PUT /items/3 HTTP/1.1" 200 - 127.0.0.1 - - [00/Apr/2018 09:00:00] "GET /items/2 HTTP/1.1" 200 - 127.0.0.1 - - [00/Apr/2018 09:00:00] "DELETE /items/5 HTTP/1.1" 200 - 127.0.0.1 - - [00/Apr/2018 09:00:00] "GET /items HTTP/1.1" 200 -
This has been tested with Python 2.7 and 3.6.
MIT License