Chapter 3. Creating a backend service

This procedure describes how to create a backend service on your local machine that is accessed from the service network.

Prerequisites

  • Python

Procedure

  1. Clone the skupper-example-hello-world repo.
  2. Change to the service directory.

    $ cd skupper-example-hello-world/backend/
  3. Install the required libraries.

    $ pip install --user flask starlette uvicorn
  4. Run the backend service

    $ python ./main.py

    The output is similar to the following:

    INFO:     Started server process [107836]
    INFO:     Waiting for application startup.
    INFO:     Application startup complete.
    INFO:     Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
  5. Test the service by navigating to the following URL.

    http://localhost:8080/api/hello

    The output is similar to the following:

    Hello from workstation (1)

    This indicates that the backend service is running and available.