An open API service indexing awesome lists of open source software.

https://github.com/talmewho/status-scope-2


https://github.com/talmewho/status-scope-2

css-modules react websockets

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

          

# StatusScope

To run it locally against a real API (change the URL here) -

`STATUS_URL_TEMPLATE=(API-URL-here-with-a-{region}-for-the-region-parameter) npm run dev`

To run it locally against a mock endpoint and quick refreshing -

`MINIMAL_FETCH_INTERVAL=15000 SERVE_MOCK_STATUS=true FETCH_INTERVAL=10000 STATUS_URL_TEMPLATE=http://localhost:3000/api/mock-status?region={region} npm run dev`

To see it in action -

[https://magnetic-leena-talmewhofree-c523c79e.koyeb.app/](https://magnetic-leena-talmewhofree-c523c79e.koyeb.app/)

image

# Improvements
To make this production-grade, I would utilise a caching server, like Redis and utilise something like an orchestrator that can pass events as there could be multiple instances of the server running. This ensures the fetching happens only periodically and the target server is never overloaded by this, regardless of how many instances there are.

On the purely technical side, I would improve the configuration to make sure the typecheck does not fail and the IDE stops showing squiggly lines in tests.

And I would have definitely switched to a better template, like Next.js, but that was too resource-intensive for free card-less hosting services.