smileydts / death-or-glory

0 stars 0 forks source link

Server-Sent Event to get the players in the game #32

Closed smileydts closed 2 months ago

smileydts commented 2 months ago

@djpace14

Here's how you can test this branch to stream the current list of players to someone currently in the game:

  1. Checkout branch of this pull request
  2. Go to postman.com
  3. Import the Postman collection from server\postman_collections\dog.postman_collection.json (use the import button on the screen)
  4. docker-compose up
  5. In another browser tab, navigate to localhost:5173 and join the game
  6. In a new browser tab, navigate to http://localhost:5000/stream?player_id=0
  7. In postman, run one of the API calls for another player to join the game
  8. Go back to the browser tab where you entered http://localhost:5000/stream?player_id=0
  9. You should see data returned with both players now in the game
  10. Again using Postman, have two more players join the game
  11. Each time a player joins, observe the data being sent in that tab with the stream. Once the game is full, each player should have cards.
smileydts commented 2 months ago

Superseded by dog-33-integrate-sse