Skip to content

albin21stcentury/hpdf-week1-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hpdf week1 task

Project Title

This is the week 1 task done under Hasura Product Development Fellowship.

Getting Started

Prerequisites

Python flask should be installed to run this code. Download python from https://www.python.org/downloads/ and install We are using python3 for this app. Flask the official site is http://flask.pocoo.org/docs/0.12/installation/

Installing

In cmd for windows and equivalent terminals:

Afer installing python and pip, navigate to the folder containing these files and install flask by "pip install flask"

  • "set FLASK_APP=routes.py" then enter

Now to run the app

  • "flask run"

Running the tests

  1. Displaying simple hello world After running "flask run" in cmd open browser at http://127.0.0.1:5000/ and output will be displayed.

  2. Responding with authors and number of posts with objects acquired from different urls. Open http://127.0.0.1:5000/authors and output will be displayed.

  3. Set a simple cookie (if it has not already been set) Open http://127.0.0.1:5000/setcookie and cookies will be set.

  4. Fetch the set cookie with http://localhost:8080/getcookies​ and display the stored key-values in it. Open http://127.0.0.1:5000/getcookies and set cookies will be displayed.

  5. Denying requests to http://localhost:8080/robots.txt​ page.

When u try to access the url see what happens.:)

  1. Render an HTML and image.

    Open browser at http://127.0.0.1:5000/html and a sample html is rendered.

    Open http://127.0.0.1:5000/image and an image will be rendered. It is a Pikachu.

  2. User input display Open http://127.0.0.1:5000/input in browser Enter and value in the input box Then the data will be visible on your cmd or any terminal.

Authors

Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published