{"id":16514287,"url":"https://github.com/christophersmith/nestjs-rest-orm-user-microservice","last_synced_at":"2025-07-01T00:03:08.674Z","repository":{"id":165314891,"uuid":"464963080","full_name":"christophersmith/nestjs-rest-orm-user-microservice","owner":"christophersmith","description":"An example NestJS project that uses TypeORM to demonstrate a Node.js-based REST microservice.","archived":false,"fork":false,"pushed_at":"2022-03-22T20:21:34.000Z","size":216,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-02T11:49:36.028Z","etag":null,"topics":["docker","example","microservice","mssql","nestjs","swagger","typeorm","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/christophersmith.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":"2022-03-01T16:05:41.000Z","updated_at":"2025-02-24T21:23:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce51071b-ea68-4a7b-8b3b-0c2984df5ef1","html_url":"https://github.com/christophersmith/nestjs-rest-orm-user-microservice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/christophersmith/nestjs-rest-orm-user-microservice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophersmith%2Fnestjs-rest-orm-user-microservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophersmith%2Fnestjs-rest-orm-user-microservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophersmith%2Fnestjs-rest-orm-user-microservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophersmith%2Fnestjs-rest-orm-user-microservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christophersmith","download_url":"https://codeload.github.com/christophersmith/nestjs-rest-orm-user-microservice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophersmith%2Fnestjs-rest-orm-user-microservice/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262870852,"owners_count":23377309,"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":["docker","example","microservice","mssql","nestjs","swagger","typeorm","typescript"],"created_at":"2024-10-11T16:12:05.002Z","updated_at":"2025-07-01T00:03:08.638Z","avatar_url":"https://github.com/christophersmith.png","language":"TypeScript","readme":"# NestJS + TypeORM + Swagger REST User Microservice\n\nAn example NestJS project that uses TypeORM to demonstrate a Node.js-based REST microservice. This example compliments my [Lab Notes: Looking at NestJS for Web Apps – Overview, Performance, Thoughts](https://blog.missiondata.com/lab-notes-looking-at-nestjs-for-web-apps-overview-performance-thoughts/) blog article where I provide an overview of NestJS, discuss performance, and wrap up with thoughts from a developer perspective.\n\nThis application uses TypeORM and Swagger to implement a simple REST microservice using the _default_ NestJS configuration. The REST endpoints allow you to retrieve and manage user records from a Microsoft SQL Server database. You are able to get a list of all users, get one user, create a user, update a user, and delete a user. All client input, like user identifiers or details, is validated.\n\n## Requirements\n\n- [Node.js 16+](https://nodejs.org/)\n- Docker for your environment\n  - [Docker Desktop](https://www.docker.com/products/docker-desktop) for Mac or Windows\n  - [Docker for Linux](https://hub.docker.com/search?offering=community\u0026operating_system=linux\u0026q=\u0026type=edition)\n\n## Installation\n\nThe following commands should be run from the project directory after you've installed the requirements above.\n\nInstall the required node packages and build the project:\n\n```bash\n$ npm install\n$ npm run build\n```\n\nStart up the Docker container with Microsoft SQL Server:\n\n```bash\n$ docker-compose up\n```\n\nOnce the Docker container is started, run the following command to create the necessary database tables:\n\n```bash\n$ npm run typeorm:migration:run\n```\n\n**OPTIONAL:** Run this command if you'd like some dummy data to play with:\n\n```bash\n$ npm run seed:run\n```\n\n## Running the app\n\nTo run the application, execute the command:\n\n```bash\n$ npm run start\n```\n\nOnce started, you can acess the Swagger API from [http://localhost:3000](http://localhost:3000) to experiment with the API calls.\n\nWhen finished, you can stop the NestJS app and the docker-compose process by pressing the keys `CTRL + C`.\n\n## Test\n\nThe following commands will run tests. Please note that the database should be running (via `docker-compose up`) for the end-to-end tests.\n\n```bash\n# unit tests\n$ npm run test\n\n# end-to-end tests\n$ npm run test:e2e\n\n# test coverage\n$ npm run test:cov\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristophersmith%2Fnestjs-rest-orm-user-microservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristophersmith%2Fnestjs-rest-orm-user-microservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristophersmith%2Fnestjs-rest-orm-user-microservice/lists"}