{"id":18045361,"url":"https://github.com/lance/viewer","last_synced_at":"2025-09-10T14:05:21.789Z","repository":{"id":44135829,"uuid":"405066722","full_name":"lance/viewer","owner":"lance","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-01T20:17:39.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T11:48:39.705Z","etag":null,"topics":[],"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/lance.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-10T12:05:13.000Z","updated_at":"2022-10-13T19:43:52.000Z","dependencies_parsed_at":"2024-10-30T18:13:07.699Z","dependency_job_id":"b18ff2f9-214b-4fe9-a668-ca0a9ed1d9fe","html_url":"https://github.com/lance/viewer","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/lance%2Fviewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lance%2Fviewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lance%2Fviewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lance%2Fviewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lance","download_url":"https://codeload.github.com/lance/viewer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284914,"owners_count":20913691,"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":[],"created_at":"2024-10-30T18:12:58.423Z","updated_at":"2025-04-05T03:41:53.029Z","avatar_url":"https://github.com/lance.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node.js HTTP Function\n\nWelcome to your new Node.js function project! The boilerplate function code can be found in [`index.js`](./index.js). This function will respond to incoming HTTP GET and POST requests. This example function is written synchronously, returning a raw value. If your function performs any asynchronous execution, you can safely add the `async` keyword to the function, and return a `Promise`.\n\n## Local execution\n\nAfter executing `npm install`, you can run this function locally by executing `npm run local`.\n\nThe runtime will expose three endpoints.\n\n  * `/` The endpoint for your function.\n  * `/health/readiness` The endpoint for a readiness health check\n  * `/health/liveness` The endpoint for a liveness health check\n\nThe parameter provided to the function endpoint at invocation is a `Context` object containing HTTP request information.\n\n```js\nfunction handleRequest(context) {\n  const log = context.log;\n  log.info(context.httpVersion);\n  log.info(context.method); // the HTTP request method (only GET or POST supported)\n  log.info(context.query); // if query parameters are provided in a GET request\n  log.info(context.body); // contains the request body for a POST request\n  log.info(context.headers); // all HTTP headers sent with the event\n}\n```\n\nThe health checks can be accessed in your browser at [http://localhost:8080/health/readiness]() and [http://localhost:8080/health/liveness](). You can use `curl` to `POST` an event to the function endpoint:\n\n```console\ncurl -X POST -d '{\"hello\": \"world\"}' \\\n  -H'Content-type: application/json' \\\n  http://localhost:8080\n```\n\nThe readiness and liveness endpoints use [overload-protection](https://www.npmjs.com/package/overload-protection) and will respond with `HTTP 503 Service Unavailable` with a `Client-Retry` header if your function is determined to be overloaded, based on the memory usage and event loop delay.\n\n## Testing\n\nThis function project includes a [unit test](./test/unit.js) and an [integration test](./test/integration.js). All `.js` files in the test directory are run.\n\n```console\nnpm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flance%2Fviewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flance%2Fviewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flance%2Fviewer/lists"}