{"id":21241198,"url":"https://github.com/icyjoseph/weather-webtask","last_synced_at":"2026-05-13T07:42:01.417Z","repository":{"id":37739533,"uuid":"147913412","full_name":"icyJoseph/weather-webtask","owner":"icyJoseph","description":"Weather webtask","archived":false,"fork":false,"pushed_at":"2022-12-08T12:15:16.000Z","size":134,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T19:41:25.792Z","etag":null,"topics":["express","nodejs","serverless","weather","webtask"],"latest_commit_sha":null,"homepage":"","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/icyJoseph.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":"2018-09-08T07:51:34.000Z","updated_at":"2022-06-22T08:47:49.000Z","dependencies_parsed_at":"2023-01-25T07:30:11.115Z","dependency_job_id":null,"html_url":"https://github.com/icyJoseph/weather-webtask","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/icyJoseph%2Fweather-webtask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyJoseph%2Fweather-webtask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyJoseph%2Fweather-webtask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyJoseph%2Fweather-webtask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icyJoseph","download_url":"https://codeload.github.com/icyJoseph/weather-webtask/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681005,"owners_count":20330155,"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":["express","nodejs","serverless","weather","webtask"],"created_at":"2024-11-21T00:54:56.745Z","updated_at":"2026-05-13T07:42:01.371Z","avatar_url":"https://github.com/icyJoseph.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weather WebTask\n\nExpress server using [webtask.io](https://webtask.io/).\n\n## Purpose\n\nThis express server is the backend to [my weather UI](https://github.com/icyJoseph/weatherApp).\n\nIt's main purpose is to hide secret API keys and reduce the front end asynchronous code to one call.\n\nThis express server in turn takes a query, and puts it through the Geolocation API and then the Weather Forecast API.\n\n## Webtask context\n\nThe request object contains a bunch of valuable information.\n\nThis snippet for a POST request will help you see this information in a more readable way.\n\n```javascript\napp.post(\"/\", (req, res) =\u003e {\n  // To see all the information loaded in the req object\n  console.log(Object.keys(req));\n  const {\n    webtaskContext,\n    query,\n    body,\n    route,\n    params,\n    originalUrl,\n    baseUrl\n  } = req;\n\n  console.log(\"webtaskContext\", webtaskContext);\n  console.log(\"query\", query);\n  console.log(\"body\", body);\n  console.log(\"route\", route);\n  console.log(\"params\", params);\n  console.log(\"originalUrl\", originalUrl);\n  console.log(\"baseUrl\", baseUrl);\n\n  return res.status(200).send({});\n});\n```\n\nThe webtaskContext object, gives us access to very useful information, one of which are secrets.\n\n```javascript\n{ data: {},\n  headers:\n   { 'content-type': 'application/json',\n     'user-agent': 'vscode-restclient',\n     host: 'localhost:1337',\n     'accept-encoding': 'gzip, deflate',\n     'content-length': '34',\n     connection: 'keep-alive',\n     'x-wt-params': 'eyJjb250Y1lpZXIiOiJ3ZWJ0YXNrLWxvY2FsIiwibWIiOnRydWUsInBjdHgiOnt9LCJwYiI6bnVsbCwicmVxX2lkIjoiMTUzNjQxNjk4NzU3OCIsImVjdHgiOnt9LCJtZXRhIjp7fSwidG9rZW4iOiJleUpoYkdjaU9pSklVekkxTmlJc0luUjVjQ0k2SWtwWFZDSjkuZXlKallTSTZXMTBzSW1Sa0lqb3hMQ0pxZEdraU9pSlBhSGxPTjFFdlZtOXVXREEzYW1OaWJWTkhkbFJxVFc5bEwwMXpaRUZqV2lJc0ltbGhkQ0k2TVRVpk5qUXhOams0TnpVM09Td2lkR1Z1SWpvaWQyVmlkR0Z6YXkxc2IyTmhiQ0o5LmZrMk9WaXVfR1lNRkduNTlDYUx6WFByUDlBODVCejE4SGdQYTlINnRiS0UiLCJ1cmxfZm9ybWF0IjozfQ==' },\n  id: '1536416987892',\n  params: {},\n  query: {},\n  secrets: {},\n  meta: {},\n  storage:\n   { data: undefined,\n     etag: undefined,\n     get: [Function: get],\n     set: [Function: set] },\n  token: undefined,\n  create_token: [Function],\n  create_token_url: [Function],\n  read: [Function: readNotAvailable],\n  write: [Function: writeNotAvailable] }\n```\n\nThe secrets are your API keys and other information you may use to forward calls and fetch data from other API endpoints.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficyjoseph%2Fweather-webtask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficyjoseph%2Fweather-webtask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficyjoseph%2Fweather-webtask/lists"}