{"id":17295758,"url":"https://github.com/bnb/examples","last_synced_at":"2025-10-08T03:45:42.008Z","repository":{"id":74933161,"uuid":"252296222","full_name":"bnb/examples","owner":"bnb","description":"A repository of Node.js examples.","archived":false,"fork":false,"pushed_at":"2020-04-02T21:01:51.000Z","size":19,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T05:11:15.299Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bnb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-04-01T22:01:37.000Z","updated_at":"2023-02-15T15:39:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"b3f6a5c2-85cd-417a-b303-f33bd24d3ec0","html_url":"https://github.com/bnb/examples","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/bnb%2Fexamples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnb%2Fexamples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnb%2Fexamples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnb%2Fexamples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bnb","download_url":"https://codeload.github.com/bnb/examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245729303,"owners_count":20662838,"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-15T11:11:07.505Z","updated_at":"2025-10-08T03:45:36.964Z","avatar_url":"https://github.com/bnb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node.js Examples\n\nThis repository is a collective of opinionated and real-world examples of how you can use Node.js to build things.\n\n## How This Repository is Structured\n\nThis repository is structured in a specific way. Top-level directories are categories of applications - for example `CLI`, `server`, and `utility` - that enable you to find the specific _kind_ of example you're looking for. From there, subdirectories of the categories are specific modules, frameworks, or tools - for example, `yargs` is a CLI framework, both `express` and `fastify` are web frameworks, and `moment` is a utility. Inside of each of those directories exists project directories, where specific examples live. You can find a full list of these examples in the [Examples](#examples) section below.\n\nEach example has a few things (if one doesn't, please let us know by creating an issue):\n\n- Usable example code with comments.\n- Passing tests.\n- A README.md that explains what the example does and how to use it.\n\n## Examples\n\n### CLI\n\nCommand Line Interfaces (CLIs) are tools that can be accessed exclusively from the command line that generally serve some utility. There is a vibrant community of Node.js CLI utilities, ranging from packages to make it slightly easier to accomplish something to full frameworks for building CLI experiences.\n\n- [CLI](./cli)\n  - [yargs](./cli/yargs)\n    - [countEntriesInDirectory](./cli/yargs/countEntriesInDirectory): A small command line tool that shows how to use yargs and Node.js together, leveraging Node.js's `path` and `fs` modules to read a directory passed by the CLI user\n\n## Contributing\n\nWe genuinely appreciate folks who are trying to help out by lowering the barrier to understanding Node.js 🤗\n\nOur baseline for all contributions is following the project's [Code of Conduct]().\n\n### Contributing New Examples\n\nIf you'd like to contribute an example, we'd genuinely appreciate your help. , there's a few things we'll expect from any contribution of a new example:\n\n- Correct directory structure. This means:\n- Usable example code. This means:\n  - Comprehensive comments.\n  - Descriptive and readable variable names.\n  - Modern JavaScript.\n- We use Jest for testing. Examples' tests should check these boxes:\n  - Tests should be written for all code that can be tested.\n  - Tests should be in the format of `\u003cname-of-file-being-tested\u003e.test.js` and should live alongside the files they're testing.\n- Proper documentation. This means:\n  - A README.md that explains what the example does and how to use it, plus documents the examples dependencies.\n  - The README should include a title, description, instructions for usage, and instructions for running the test.\n\n### Contributing to Tests\n\nWe're always willing to take on more tests or improvements to our existing tests. We use Jest, and actively leverage the `onlyChanged` flag to reduce nosie in our CI.\n\n### Contributing to Prose\n\nThis repository has a non-trivial amount of written content. If you're interested in helping provide clarity and context or otherwise improving our prose, we welcome your contributions.\n\n### Thank You To Our Contributors\n\n\u003e We use All Contributors for this section of the README. Please ensure you have the `all-contributors-cli` installed if you're modifying it. See the [All Contributors CLI Usage](https://allcontributors.org/docs/en/cli/usage) documentation for details on usage.\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://bnb.im\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/502396?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eTierney Cyren\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/node/examples/commits?author=bnb\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#content-bnb\" title=\"Content\"\u003e🖋\u003c/a\u003e \u003ca href=\"https://github.com/node/examples/commits?author=bnb\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://github.com/node/examples/commits?author=bnb\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbnb%2Fexamples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbnb%2Fexamples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbnb%2Fexamples/lists"}