Skip to content

Add /stats page#3

Closed
johnpgr wants to merge 2 commits intotsoding:mainfrom
johnpgr:main
Closed

Add /stats page#3
johnpgr wants to merge 2 commits intotsoding:mainfrom
johnpgr:main

Conversation

@johnpgr
Copy link

@johnpgr johnpgr commented Jul 15, 2024

This PR will:

  • Create a new HTTP Server inside Stats namespace.
  • The server will respond any request with a response stream that push the current game stats every STATS_FEED_INTERVAL_MS configured as 2000 (ms) currently
  • Create stats.html document that renders the stats (Currently a very basic implementation with 3 charts grouped by the stat kind)
  • Move Stats types to ./common.mts
  • Install @types/plotly.js as development dependency (for creating the charts) (types only because the stats.html uses a script tag pulling the lib from cdn)

<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script src="https://cdn.plot.ly/plotly-2.32.0.min.js" charset="utf-8"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too much bloat for drawing simple shapes which I'm not sure I want in the first place.

@rexim rexim closed this Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants