{"id":16841770,"url":"https://github.com/svozza/readert-aws-example","last_synced_at":"2025-07-26T00:08:11.165Z","repository":{"id":84263980,"uuid":"305945399","full_name":"svozza/ReaderT-aws-example","owner":"svozza","description":"A simple example of how to use monad transformers to perform side effects that access AWS","archived":false,"fork":false,"pushed_at":"2020-10-22T08:06:18.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T12:13:17.260Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/svozza.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":"2020-10-21T07:38:59.000Z","updated_at":"2020-10-22T08:06:20.000Z","dependencies_parsed_at":"2023-05-24T04:30:41.850Z","dependency_job_id":null,"html_url":"https://github.com/svozza/ReaderT-aws-example","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/svozza%2FReaderT-aws-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svozza%2FReaderT-aws-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svozza%2FReaderT-aws-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svozza%2FReaderT-aws-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svozza","download_url":"https://codeload.github.com/svozza/ReaderT-aws-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244161344,"owners_count":20408301,"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-13T12:42:58.151Z","updated_at":"2025-03-18T05:23:44.196Z","avatar_url":"https://github.com/svozza.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ReaderT-aws-example\n\nThe node.js script in `index.js` uses the `ReaderT` monad transformer (from \n[Crocks](https://crocks.dev/docs/crocks/ReaderT.html)) to pass dependencies to the effectful functions.\nThe monad stack comprises the [Reader](https://crocks.dev/docs/crocks/Reader.html) and [Async](https://crocks.dev/docs/crocks/Async.html) \nmonads. The exported `run` function will retrieve the first 5 objects in a specified S3 Bucket.\n\n### To use\n\nEnsure you have these variables set in your shell\n\n```bash\nexport AWS_REGION=\u003cregion\u003e\nexport AWS_ACCESS_KEY_ID=\u003caccess key\u003e\nexport AWS_SECRET_ACCESS_KEY=\u003csecret access key\u003e\n```\n\nThen consume the `run` function\n\n```js\nconst {run} = require('index');\n\nconst log = label =\u003e console.log.bind(console, label + ':');\n\n// using Crocks Async ADT\nrun('myBucket').fork(log('rej'), log('res'));\n\n// using async / await\nconst objects = await run('myBucket').toPromise();\nconsole.log(objects);\n```\n\n### Running unit tests\n\n```bash\nnpm test\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvozza%2Freadert-aws-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvozza%2Freadert-aws-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvozza%2Freadert-aws-example/lists"}