{"id":24991685,"url":"https://github.com/constup/cookbook-nestjs-typescript","last_synced_at":"2025-10-29T04:02:39.445Z","repository":{"id":46237927,"uuid":"515217608","full_name":"constup/cookbook-nestjs-typescript","owner":"constup","description":"NodeJS cookbook based on examples","archived":false,"fork":false,"pushed_at":"2022-12-27T23:13:24.000Z","size":323,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-04T13:51:29.459Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/constup.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}},"created_at":"2022-07-18T14:26:16.000Z","updated_at":"2024-04-07T14:33:17.000Z","dependencies_parsed_at":"2023-01-31T05:15:14.180Z","dependency_job_id":null,"html_url":"https://github.com/constup/cookbook-nestjs-typescript","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/constup%2Fcookbook-nestjs-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constup%2Fcookbook-nestjs-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constup%2Fcookbook-nestjs-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constup%2Fcookbook-nestjs-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/constup","download_url":"https://codeload.github.com/constup/cookbook-nestjs-typescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246187239,"owners_count":20737463,"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":"2025-02-04T13:51:35.725Z","updated_at":"2025-10-29T04:02:39.381Z","avatar_url":"https://github.com/constup.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NestJS TypeScript cookbook\n\n## NOTE\n\n\u003e This repository is still in WIP state and is not ready to accept contributions at the moment.\n\u003e Examples might significantly change, and directories might be shifted around while the project is in the WIP state. \n\n## Short Description\n\nThis is a collection of examples related to NestJS, a NodeJS framework with TypeScript. This repository is built as a \nNestJS project and can be installed and run like any other NestJS project.\n\nQuickstart and reference: [Table of contents](./doc/table_of_contents.md)\n\nThe following main technologies are covered:\n\n- NestJS (in TypeScript)\n- TypeScript\n- Vanilla NodeJS (in TypeScript)\n\nSee the Long description below for more details.\n\n## Top-level Table of contents\n\nAll top-level categories are in `/src` directory.\n\n- **NestJS**: Examples related to NestJS framework;\n- **NodeJS**: Examples related to NodeJS;\n- **Typescript**: Examples related to typescript;\n- **NodeJS libraries**: Examples related to some common NodeJS libraries (npm packages);\n- **Testing**: Examples related to unit, integration and E2E testing; \n- **Mocks**: Mocks of web servers and services;\n\n## Installation\n\n### Prerequisites\n\n- NodeJS 16 ([Official Download and installation instructions](https://nodejs.org/en/download/))\n- NestJS CLI 9 ([Official Download and installation instructions](https://docs.nestjs.com/))\n\n### Installation\n\n```bash\n$ npm install\n```\n\n## Running the app\n\n```bash\n# development\n$ npm run start\n\n# watch mode\n$ npm run start:dev\n```\n\n## Test\n\n### Jest\n\nJest tests are available for each example in the same directory. These files are named `*.spec.ts`.\n\n### JetBrains HTTP Client tests\n\nExamples contain `*.http` files which can be opened in and used by JetBrains IDEs \n([WebStorm](https://www.jetbrains.com/webstorm/), [PHPStorm](https://www.jetbrains.com/phpstorm/)). These files contain \ncommands which can be run by JetBrains HTTP Client (built into the IDE).\n\nExamples in this repository are all showcased in controllers. This is done so that you can actually run the example code\nwithout doing anything extra - no tests, no mocks, just running the examples directly as if it's a production \napplication. You can also use the Debugger in your IDE and execute the code step by step if you want to.\n\nSome examples require additional data to be passed to controllers (like: examples of HTTP POST requests with data \npayloads) and you can't easily do that in your browser. Each example and each controller is covered with JetBrains HTTP \nClient requests with sample payloads already prepared, so that you can just click on \"run\" and see the code in action, \nright from your IDE.\n\n## Long description\n\nAll web applications, regardless of the language they are written in, have a set of core building blocks - like sending\nand receiving HTTP requests, reading environment variables and configuration values, handling controllers and CLI \ncommands... This project organizes examples in categories (directories/folders) with each category representing one of \nthese building blocks.\n\nThe main idea behind this project is learning by examples. Intended audience are:\n\n- Experienced programmers specialized in other languages or technologies who want to expand their toolset;\n  - By organizing examples in building block categories, experienced programmers, who are already well familiar with \n    application building blocks but are coming from a different language (for example PHP or Java), can easily jump in \n    and use Node and Nest while catching up with the syntax on the go.\n- Inexperienced programmers who want to have simple examples to go with the theory and official documentation;\n  - Reading theory and official documentation is good. Having concrete runnable examples to go along with the theory and\n    official documentation is better. Just remember that this project is only accompanying official documentation and is\n    not intended to be used alone.\n- All programmers to have a simple how-to examples to help them be more productive in their daily work;\n  - Instead of searching StackOverflow, read it here. The answers you can find here are all covered with tests which you \n    can run and modify to your needs. You can also play with the code directly, if you need to test a specific idea or\n    requirement from your daily work.\n\n## Contribution\n\nYou are free to contribute to this repository, either by expanding existing examples or adding your own. There are,\nhowever, certain rules to follow in order to keep the examples consistent and easy to use. You can read more about it in\n[Contribution guidelines](./doc/contribution_guidelines.md).\n\n## License\n\nGNU GPL 3.0\n\nFull license is available in [LICENSE](./LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconstup%2Fcookbook-nestjs-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconstup%2Fcookbook-nestjs-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconstup%2Fcookbook-nestjs-typescript/lists"}