Used for Hasura Product Development Fellowship
The following instructions will help you set up the repository and run it on your local machine.
- Install Python 3.x from here
- Install Flask by typing the command
pip install flask
on Command Prompt (Windows) or Terminal (Linux / Mac).
- Clone this repository to your local machine using
git clone
- Navigate to the local repository using Command Prompt or Terminal.
- Type python main.py and press Enter.
Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
- Upon receiving the above message, open a browser of your choice and go to http://127.0.0.1:5000/
- Upon visiting http://127.0.0.1:5000/ a Hello World message is displayed. (Question 1)
- Visit http://127.0.0.1:5000/authors to view the list of authors with the count of posts published. (Question 2)
- Visit http://127.0.0.1:5000/setcookie to set cookies. (Question 3)
- Visit http://127.0.0.1:5000/getcookies to view the cookies set. (Question 4)
- Visit http://127.0.0.1:5000/robots.txt for a request denied message. (Question 5)
- HTML page is rendered at http://127.0.0.1:5000/html (Question 6)
- An image can be viewed at http://127.0.0.1:5000/image (Question 6)
- Visit http://127.0.0.1:5000/input. A textbox is displayed. Enter a name and press the Click Me button. You will be redirected to http://127.0.0.1:5000/output/nameEntered. Check Command Prompt or Terminal to view the name entered. (Question 7)