telepat-api
telepat-api copied to clipboard
Root endpoint for the API
Right now we don't have anything under "/" so it just returns a 404 error. We need to implement this endpoint which usually responds with info about the API/machine it's running on. Some of this info are easily collected using the host machine's tools, so we need to use shelljs to issue commands in order to collect relevant info.
It should output the following info:
- version, based on package.json (alongside git branch and commit # if git root is detected)
- services status: there's a dbConnected variable which indicates this
- requests info. We should centralize these in a sepparate place in the code
- total requests since startup
- average response time for requests
- max response time
- uptime: use process.uptime()
- node version
- OS version: use shelljs to get rich info about the OS
- memory consumed by api process.memoryUsage()
- total memory available: use cat /proc/meminfo | grep MemTotal | awk '{ print $2 }'
Is anyone working on this? If not, I can probably help. This looks like a feature which does not require too much understanding of the application, and hence will be suitable for me to start I guess! :smiley:
I found out about telepat.io on devRant :wink: ! It's super cool project IMO. But it would have been better if the backend was written in some type-safe language instead of Javascript. But in anyway, I'm interested in contributing. Let me know.
hey @ecthiender glad you like it ^^. There's no one on this feature so you can gladly take it.
Looking forward to your commits :D . If you have any questions about the implementation feel free to ask on gitter or by commenting on this issue.
PS: I know there isn't any info on this, the way others can contribute to Telepat is by forking + pull requesting ^^