Node.js script to check the status of my server pages. https://kevin-mok.com/server/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1011 B

5 years ago
5 years ago
5 years ago
  1. # Server Pages
  2. Converts a [CSV](server-pages.csv) containing information about my
  3. server pages into a JSON containing information about the pages'
  4. status, update time and server uptime. Created for use on my personal
  5. website's [server information page].
  6. [server information page]: https://kevin-mok.com/server/
  7. ## Sample Output
  8. Running `node server-status.js` (after `npm i`) would produce the
  9. following output:
  10. ``` json
  11. {
  12. "sites": [
  13. {
  14. "shortUrl": "kevin-mok.com",
  15. "url": "https://kevin-mok.com",
  16. "siteTitle": " Kevin Mok ",
  17. "description": "Personal site (this site).",
  18. "repo": "Kevin-Mok/my-site",
  19. "repoUrl": "https://git.kevin-mok.com/Kevin-Mok/my-site",
  20. "status": "up"
  21. },
  22. ...
  23. ],
  24. "updateTime": 1569209941343,
  25. "upSince": "2019-09-22 19:30:10"
  26. }
  27. ```
  28. ## Built With
  29. * [csvtojson]
  30. * [url-metadata] - Fetch pages for their titles.
  31. [csvtojson]: https://www.npmjs.com/package/csvtojson
  32. [url-metadata]: https://www.npmjs.com/package/url-metadata