Skip to content
This repository has been archived by the owner on Sep 21, 2018. It is now read-only.

thehappydinoa/intern-code-test-answer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intern Code Test Response Python 2.7 Codacy Badge

Response to Intern Code Test

How to run

  1. Configure database settings in settings.py

    "db_config": {
        "host": "localhost",
        "dbname": "code-test",
        "user": "intern",
        "password": "password101"
    }
  2. Install requirements

    pip install -r requirements.txt
  3. 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 -

DEPENDENCIES

This has been tested with Python 2.7 and 3.6.

LICENSE

MIT License