Skip to content

This is meant to be a Python3 challenge for displaying recipes in the web browser.

Notifications You must be signed in to change notification settings

m8nky/recipelist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Recipe server in Python3

This little service is supposed to help learn coding in Python3. The idea is to serve cooking recipes to a web consumer.

Goal

The expected result is:

  • Implement a recipe service in Python3, based on the template in this repository.

  • Start the application.

  • Open browser, hit in the service URL (see below), and see the recipes at the webpage.

Starting hints

Before downloading and starting the application, make sure your python3 environment is already installed and ready to use.

First download the 'recipelist' application from GitHub.

git clone https://github.com/m8nky/recipelist.git

And try to run it the first time.

cd recipelist/app
./run

When the server is running, open the browser and load the website http://localhost:8001/.

The browser should display 'Hello World!'.

Next step, serving recipe content.

Edit the file app/msapp/domain/service/recipeService.py and implement the serve function.

class RecipeService:
    '''
      RecipeService.serve is called by the HTTP server, when a new browser request comes in.

      Serve the browser with some recipe content.

      Parameters:
        request (str): The path of the requested URL (e.g. '/' or '/recipelist').

      Returns:
        str: The content (text or html), that is replied to the browser.
    '''
    def serve(self, request: str) -> str:
        # ADD YOUR CODE HERE!!!
        pass

About

This is meant to be a Python3 challenge for displaying recipes in the web browser.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages