Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Root endpoint for the API #17

Open
Mayhem93 opened this issue Feb 17, 2017 · 2 comments
Open

Root endpoint for the API #17

Mayhem93 opened this issue Feb 17, 2017 · 2 comments

Comments

@Mayhem93
Copy link
Member

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 }'
@ecthiender
Copy link

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! 😃

I found out about telepat.io on devRant 😉 ! 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.

@Mayhem93
Copy link
Member Author

Mayhem93 commented Mar 25, 2017

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 ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants