We proceed with the recipe as follows:
- The sample microservice is implemented in 10/01/hello_microservice.py. This is a very simple service that can be passed a name for which the microservice replies Hello, <name>!.
- To run the microservice, we need to simply execute the following command from the terminal (while in the directory for the script):
$nameko run hello_microservice
- Nameko opens the Python file matching the specified microservices name and starts up the microservice. When starting, we will see a few lines of output:
starting services: hello_microserviceConnected to amqp://guest:**@127.0.0.1:5672//
- This states that Nameko has found our microservice, and that it has connected to an AMQP server (RabbitMQ) on port ...