{"id":19180133,"url":"https://github.com/onyelaudochukwuka/status-server","last_synced_at":"2026-05-08T16:46:46.160Z","repository":{"id":37486138,"uuid":"504262268","full_name":"Onyelaudochukwuka/Status-Server","owner":"Onyelaudochukwuka","description":"An API that helps users check if a webpage is up or down and prompts users with a text message if the state of saved sites changes","archived":false,"fork":false,"pushed_at":"2022-07-26T09:37:41.000Z","size":123,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-04T03:28:13.552Z","etag":null,"topics":["api","javascript","nodejs","rest-api"],"latest_commit_sha":null,"homepage":"https://status.up.railway.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Onyelaudochukwuka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-16T18:21:43.000Z","updated_at":"2022-06-21T13:22:11.000Z","dependencies_parsed_at":"2022-08-31T20:01:35.083Z","dependency_job_id":null,"html_url":"https://github.com/Onyelaudochukwuka/Status-Server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Onyelaudochukwuka%2FStatus-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Onyelaudochukwuka%2FStatus-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Onyelaudochukwuka%2FStatus-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Onyelaudochukwuka%2FStatus-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Onyelaudochukwuka","download_url":"https://codeload.github.com/Onyelaudochukwuka/Status-Server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240258178,"owners_count":19772969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","javascript","nodejs","rest-api"],"created_at":"2024-11-09T10:48:13.999Z","updated_at":"2026-05-08T16:46:41.126Z","avatar_url":"https://github.com/Onyelaudochukwuka.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Status-Server\r\n\r\n##### An API that helps users check if a webpage is up or down and prompts users with a text message if the state of saved sites changes\r\n\r\n# API Structure\r\n\r\n### dependency tree\r\n\r\n           index \r\n             |   \r\n       ----    ----   \r\n       |           |\r\n       |           |         \r\n    server      workers     \r\n       |           |         \r\n       |           |              \r\n     handlers     logs        \r\n       |           |      \r\n       |           |        \r\n       |-----------|\r\n             |\r\n             |\r\n           helpers\r\n             |\r\n             |\r\n           data\r\n             |\r\n             |\r\n          config\r\n          \r\n          index--initializes the server and workers.\r\n          \r\n          servers---handles all user request and response.\r\n          \r\n          workers-----handles all data logs and checks.\r\n          \r\n          handlers---hanldles all routes on the server.\r\n          \r\n          logs----handles creation of logfiles and their compression and update.\r\n          \r\n          helpers---handles hashing of passwords, parsing payload to json , texting users, creating.\r\n          \r\n          data----handles file creation and data extraction.\r\n          \r\n          config---handles environment configuration.\r\n        \r\n \r\n# Usage Guide\r\n\r\n#### id serves as a private key while publickey serves as a public key\r\n## Routes\r\n\r\n### /ping\r\n\r\n##### Method for generating public keys\r\n\r\n```bash\r\n\r\nconst options = {\r\n  method: 'GET',\r\n};\r\n\r\nfetch('https://status.up.railway.app/ping', options)\r\n  .then(response =\u003e response.json())\r\n  .then(response =\u003e console.log(response))\r\n  .catch(err =\u003e console.error(err));\r\n  \r\n  ```\r\n  \r\n  ### /tokens\r\n  \r\n  ### A token is a a key needed by a user to edit data i.e a token is required to\r\n  #### POST\r\n  \r\n  ##### used to create a token, reqiured parameters are\r\n  \r\n  ###### payload\r\n  \r\n  - phone\r\n  - password\r\n\r\nyou can only used the phone password you used in creating a user\r\n\r\n```bash\r\n\r\nconst options = {\r\n  method: 'POST',\r\n  headers: {publickey: 'k7d5ih4q27nwicpxw3tr'},\r\n  body: '{\"password\":\"lightighvt\",\"phone\":\"8022623069\"}'\r\n};\r\n\r\nfetch('https://status.up.railway.app/tokens', options)\r\n  .then(response =\u003e response.json())\r\n  .then(response =\u003e console.log(response)) // returns { phone, id, expires }\r\n  .catch(err =\u003e console.error(err));\r\n  \r\n  ```\r\n  \r\n  #### GET\r\n  \r\n  ##### used to get user stored data reqires\r\n  \r\n  ###### headers\r\n  - id\r\n  \r\n  ###### query\r\n  - phone\r\n  - password\r\n \r\n ```bash\r\n const options = {\r\n  method: 'GET',\r\n  headers: {publickey: 'k7d5ih4q27nwicpxw3tr', id: '5fjikzbymsxi036o2ebf'}\r\n};\r\n\r\nfetch('https://status.up.railway.app/tokens?id=usg3t5war42alp6jck0j', options)\r\n  .then(response =\u003e response.json())\r\n  .then(response =\u003e console.log(response))\r\n  .catch(err =\u003e console.error(err));\r\n  ```\r\n  #### PUT\r\n  \r\n  ##### used to update token data or extend expiration time by a day, requires\r\n  \r\n  ###### headers\r\n  - id\r\n  \r\n  ###### payload\r\n  - firstName (optional)\r\n  - lastName (optional)\r\n  - password (optional)\r\n  - phone (required)\r\n  \r\n```bash \r\nconst options = {\r\n  method: 'PUT',\r\n  headers: {publickey: 'k7d5ih4q27nwicpxw3tr', id: '7afrngqinomsv37pt1g0'},\r\n  body: '{\"id\":id,\"extend\":true}'\r\n};\r\n\r\nfetch('https://status.up.railway.app/tokens', options)\r\n  .then(response =\u003e response.json())\r\n  .then(response =\u003e console.log(response))\r\n  .catch(err =\u003e console.error(err));\r\n  \r\n ```\r\n#### DELETE\r\n\r\n##### used to delete a token's data, requires\r\n\r\n  ###### headers\r\n  - id\r\n  \r\n  ###### payload\r\n  - phone\r\n \r\n```bash\r\nconst options = {\r\n  method: 'DELETE',\r\n  headers: {publickey: 'k7d5ih4q27nwicpxw3tr', id: '7afrngqinomsv37pt1g0'}\r\n};\r\n\r\nfetch('https://status.up.railway.app/users?id=id', options)\r\n  .then(response =\u003e response.json())\r\n  .then(response =\u003e console.log(response))\r\n  .catch(err =\u003e console.error(err));\r\n  \r\n  ```\r\n  \r\n  \r\n\r\n  \r\n\r\n  ### /users\r\n  \r\n  #### POST\r\n  \r\n  ##### used to create a user, reqiured parameters are\r\n  \r\n  ###### payload\r\n  \r\n  - firstName\r\n  - lastName\r\n  - phone\r\n  - password\r\n  - tosAgreement\r\n\r\n```bash\r\n\r\nconst options = {\r\n  method: 'POST',\r\n  headers: {publickey: 'k7d5ih4q27nwicpxw3tr', id: '7afrngqinomsv37pt1g0'},\r\n  body: '{\"lastName\":\"onyela\",\"firstName\":\"Udoka\",\"password\":\"lightighvt\",\"countrycode\":\"234\",\"phone\":\"8022623069\",\"tosAgreement\":true}'\r\n};\r\n\r\nfetch('https://status.up.railway.app/users', options)\r\n  .then(response =\u003e response.json())\r\n  .then(response =\u003e console.log(response))\r\n  .catch(err =\u003e console.error(err));\r\n  \r\n  ```\r\n  \r\n  #### GET\r\n  \r\n  ##### used to get user stored data reqires\r\n  \r\n  ###### headers\r\n  - id\r\n  \r\n  ###### query\r\n  - phone\r\n \r\n ```bash\r\n \r\n const options = {\r\n  method: 'GET',\r\n  headers: {publickey: 'k7d5ih4q27nwicpxw3tr', id: '7afrngqinomsv37pt1g0'}\r\n};\r\n\r\nfetch('https://status.up.railway.app/users', options)\r\n  .then(response =\u003e response.json())\r\n  .then(response =\u003e console.log(response))\r\n  .catch(err =\u003e console.error(err));\r\n  \r\n  ```\r\n  #### PUT\r\n  \r\n  ##### used to update user data requires\r\n  \r\n  ###### headers\r\n  - id\r\n  \r\n  ###### payload\r\n  - firstName (optional)\r\n  - lastName (optional)\r\n  - password (optional)\r\n  - phone (required)\r\n  \r\n```bash \r\nconst options = {\r\n  method: 'PUT',\r\n  headers: {publickey: 'k7d5ih4q27nwicpxw3tr', id: '7afrngqinomsv37pt1g0'},\r\n  body: '{\"lastName\":\"onyela\",\"firstName\":\"Udoka\",\"password\":\"lightighvt\",\"countrycode\":\"234\",\"phone\":\"8022623069\",\"tosAgreement\":true}'\r\n};\r\n\r\nfetch('https://status.up.railway.app/users', options)\r\n  .then(response =\u003e response.json())\r\n  .then(response =\u003e console.log(response))\r\n  .catch(err =\u003e console.error(err));\r\n  \r\n ```\r\n#### DELETE\r\n\r\n##### used to delete a user's data requires\r\n\r\n  ###### headers\r\n  - id\r\n  \r\n  ###### payload\r\n  - phone\r\n \r\n```bash\r\nconst options = {\r\n  method: 'DELETE',\r\n  headers: {publickey: 'k7d5ih4q27nwicpxw3tr', id: '7afrngqinomsv37pt1g0'}\r\n};\r\n\r\nfetch('https://status.up.railway.app/users?phone=8022623069', options)\r\n  .then(response =\u003e response.json())\r\n  .then(response =\u003e console.log(response))\r\n  .catch(err =\u003e console.error(err));\r\n  \r\n  ```\r\n  ### /checks\r\n  #### POST\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonyelaudochukwuka%2Fstatus-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonyelaudochukwuka%2Fstatus-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonyelaudochukwuka%2Fstatus-server/lists"}