{"id":13598496,"url":"https://github.com/nartc/nest-mean","last_synced_at":"2025-04-05T23:10:51.268Z","repository":{"id":33271018,"uuid":"144411490","full_name":"nartc/nest-mean","owner":"nartc","description":"NestJS Tutorial Repository","archived":false,"fork":false,"pushed_at":"2023-01-07T02:25:53.000Z","size":1255,"stargazers_count":370,"open_issues_count":47,"forks_count":80,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-29T22:08:18.100Z","etag":null,"topics":["angular","expressjs","mean-stack","mongodb","mongoose","nestjs","nestjs-typegoose","nodejs","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/nartc.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}},"created_at":"2018-08-11T19:05:11.000Z","updated_at":"2025-03-28T14:28:56.000Z","dependencies_parsed_at":"2023-01-15T00:15:29.656Z","dependency_job_id":null,"html_url":"https://github.com/nartc/nest-mean","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/nartc%2Fnest-mean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nartc%2Fnest-mean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nartc%2Fnest-mean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nartc%2Fnest-mean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nartc","download_url":"https://codeload.github.com/nartc/nest-mean/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411235,"owners_count":20934653,"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":["angular","expressjs","mean-stack","mongodb","mongoose","nestjs","nestjs-typegoose","nodejs","typescript"],"created_at":"2024-08-01T17:00:53.095Z","updated_at":"2025-04-05T23:10:51.248Z","avatar_url":"https://github.com/nartc.png","language":"TypeScript","funding_links":[],"categories":["Resources","资源","TypeScript"],"sub_categories":[],"readme":"# NestJS Tutorial Repository\n\nRepository will be separated into `server` and `client` directory for **NestJS** backend and **Angular** frontend resepctively. \n\n- [x] Server repository\n- [x] Client repository\n- [x] Docker support\n- [x] Hook up Server and Client\n\n## Server-side (NestJS)\n\nThis repository houses the Project's backend written using **NestJS**\n\n- **NSwag**: Nswag allows us to generate API Calls to our Backend on our Frontend in forms of Functions. The abstraction of **HttpClientModule** takes place in the generated file.\n- **Steps**:\n    1. `cd ./server` \u0026 `npm i` to install all dependencies for Server side\n    2. Have an instance of **MongoDB** running (`mongod`). If you use an IDE like WebStorm, I have a script called: `mongo:local` that is going to run `mongod` subsequently so you can setup a `Compound Run Configuration` with `start:dev` and `mongo:local` to start the Backend with ease.\n    3. `npm run start:dev` to start the server\n- **Note**: If there's issue connecting to local MongoDB and you make sure that you already have `mongod` running, go to `config/default.ts` and check if the `MONGO_URI` is correct. \n\n\n## Client-side (Angular)\n\nThis repository houses the Project's frontend written using **Angular 6**\n\n- **Ant Design**: The components design is by AntDesign (https://ng.ant.design/docs/introduce/en). I really like the subtle looks of AntDesign.\n- **Steps**: `npm i` to install all the dependencies then just start the application with `ng serve`\n- **Note**: Might be worth it to take a look at `proxy.conf.json` and how I setup the CLI to use the `proxy` file when serving so that we can call our backend on `localhost:3000`. This is so-called **Cross Domains Request** and our backend does not have CORS setup. Proxy will help us making the requests from `4200` to `3000`.\n\n## Docker\n\nDocker is supported.\n\n- **Branch**: `docker`\n- **Steps**: Just clone the repository, check out `docker` branch then from `root` directory, run `docker-compose up` and Docker will take over.\n- **Note**: Angular application will be served by NGINX on `localhost`; Nest application will be running on `localhost:3000`; **cAdvisor** which monitors our containers will be running on `localhost:8080`. Again, it's worthwhile to explore the Dockerfile in both `client` and `server` directory; also `nginx.conf` and `docker-compose.yml` to get the gist of how Docker and Docker Compose work.\n\nP.S: Pull Requests, Contributions are most definitely welcomed :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnartc%2Fnest-mean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnartc%2Fnest-mean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnartc%2Fnest-mean/lists"}