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
- Clone the skupper-example-hello-world repo.
Change to the service directory.
$ cd skupper-example-hello-world/backend/
Install the required libraries.
$ pip install --user flask starlette uvicorn
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)
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.