Socket.io + Angular = (kind of) real-time server stats for BZFlag.
It's easy to get started, just follow the few steps below.
Get the code
You can get the code by either cloning the reposity (which is recommended) or downloading it as a ZIP file.
To clone the repository run the following (you must have Git installed).
git clone https://github.com/bzlist/bzlist.net.git cd bzlist.net
The ZIP file can be found at https://github.com/bzlist/bzlist.net/archive/master.zip.
Install npm packages
npm packages and verify everything is working:
To see it in action run
npm start which builds and compiles the application, watches for changes to source files, and runs the Angular dev server on port
4200. Shut it down with
Useful npm scripts
These are the most useful commands defined in
|start||Runs the TypeScript compiler, asset copier, and dev server all at the same time in "watch mode."|
|build:prod||Runs the TypeScript compiler with optimizations and asset copier once and outputs it into
|build:stats && (npm run stats-es5 or stats-2015)||Builds the app and generates stats into
|build:gh-pages||The same as
|build:ssr||Builds with server-side rendering.|
|deploy:gh-pages||Deploys to GitHub Pages.|
|deploy:firebase||Deploys everything configured to Firebase.|
|deploy:firebase:ssr||Deploys the SSR function to Firebase, deletes
Note: If you deploy with server-side renderering you must delete
dist/browser/index.html after compiling the
ssr function and before deploying to hosting. This is done automatically with
npm run deploy:firebase:ssr.