Navigating Wordz Game with Microservice Architecture
Master the essential steps to set up the Wordz application environment, activate the endpoint, and seamlessly interact with the Wordz microservice.
To use our newly assembled web application, we first ensure that the database setup has been successfully completed. Then, we run the main()
method of class WordzApplication
. That starts the endpoint, ready to accept requests.
Starting a new game
Once the service is running, we interact with it by sending HTTP requests to the endpoint. We first need to start a game. To do that, we need to send HTTP POST
requests to the /start
route on our endpoint. By default, this will be available at http://localhost:8080/start
. We need to send a body, containing the JSON {"name":"testuser"}
text. We can send this request from the API widget. We click the “Create a request” button on the home page. This takes us to a view where we can enter the URL, select the POST
method, and type our JSON body data.
Creating a POST
request
We create a
POST
request to start the game:
Get hands-on with 1400+ tech skills courses.