Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions nestjs-graphql-mongodb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# compiled output
/dist
/node_modules
/build

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# temp directory
.temp
.tmp

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
4 changes: 4 additions & 0 deletions nestjs-graphql-mongodb/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
15 changes: 15 additions & 0 deletions nestjs-graphql-mongodb/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:20-alpine

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY . .

RUN npm run build

EXPOSE 3000

CMD ["npm", "run", "start:prod"]
99 changes: 99 additions & 0 deletions nestjs-graphql-mongodb/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>

[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest

<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg" alt="Donate us"/></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow" alt="Follow us on Twitter"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->

## Description

[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.

## Project setup

```bash
$ npm install
```

## Compile and run the project

```bash
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod
```

## Run tests

```bash
# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov
```

## Deployment

When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the [deployment documentation](https://docs.nestjs.com/deployment) for more information.

If you are looking for a cloud-based platform to deploy your NestJS application, check out [Mau](https://mau.nestjs.com), our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:

```bash
$ npm install -g mau
$ mau deploy
```

With Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.

## Resources

Check out a few resources that may come in handy when working with NestJS:

- Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.
- For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy).
- To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/).
- Deploy your application to AWS with the help of [NestJS Mau](https://mau.nestjs.com) in just a few clicks.
- Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).
- Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com).
- To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).
- Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com).

## Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).

## Stay in touch

- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)
- Website - [https://nestjs.com](https://nestjs.com/)
- Twitter - [@nestframework](https://twitter.com/nestframework)

## License

Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).
1 change: 1 addition & 0 deletions nestjs-graphql-mongodb/cmd.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
keploy record -c "docker run -p 3000:3000 --name nestjs-graphql --network keploy-network nestjs-graphql" --container-name "nestjs-demo" --buildDelay 60
35 changes: 35 additions & 0 deletions nestjs-graphql-mongodb/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// @ts-check
import eslint from '@eslint/js';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{
ignores: ['eslint.config.mjs'],
},
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
eslintPluginPrettierRecommended,
{
languageOptions: {
globals: {
...globals.node,
...globals.jest,
},
ecmaVersion: 5,
sourceType: 'module',
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn'
},
},
);
64 changes: 64 additions & 0 deletions nestjs-graphql-mongodb/keploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Generated by Keploy (2.4.5)
path: ""
appId: 0
appName: nestjs-graphql-mongo-db
command: docker run -p 3000:3000 --name nestjs-graphql --network keploy-network nestjs-graphql
templatize:
testSets: []
port: 0
e2e: false
dnsPort: 26789
proxyPort: 16789
debug: false
disableTele: false
disableANSI: false
containerName: nestjs-demo
networkName: ""
buildDelay: 30
test:
selectedTests: {}
globalNoise:
global: {}
test-sets: {}
delay: 5
host: ""
port: 0
apiTimeout: 5
skipCoverage: false
coverageReportPath: ""
ignoreOrdering: true
mongoPassword: default@123
language: ""
removeUnusedMocks: false
fallBackOnMiss: false
jacocoAgentPath: ""
basePath: ""
mocking: true
ignoredTests: {}
disableLineCoverage: false
disableMockUpload: true
useLocalMock: false
updateTemplate: false
record:
filters: []
basePath: ""
recordTimer: 0s
configPath: ""
bypassRules: []
generateGithubActions: false
keployContainer: keploy-v2
keployNetwork: keploy-network
cmdType: native
contract:
services: []
tests: []
path: ""
download: false
generate: false
driven: consumer
mappings:
servicesMapping: {}
self: s1
inCi: false

# Visit [https://keploy.io/docs/running-keploy/configuration-file/] to learn about using keploy through configration file.
71 changes: 71 additions & 0 deletions nestjs-graphql-mongodb/keploy/test-set-0/tests/test-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Generated by Keploy (2.4.5)
version: api.keploy.io/v1beta1
kind: Http
name: test-1
spec:
metadata: {}
req:
method: GET
proto_major: 1
proto_minor: 1
url: http://localhost:3000/
header:
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Encoding: gzip, deflate, br, zstd
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Connection: keep-alive
Cookie: _ga=GA1.1.367374226.1739423302; _ga_8KGGHKN59H=GS1.1.1739423302.1.1.1739424012.0.0.0; _ga_QQYB8VTQR0=GS1.1.1739423302.1.1.1739424012.0.0.0; __next_hmr_refresh_hash__=06643411c8f2fbca41b184e6f40b6287633457081244afec; authjs.csrf-token=4f73518f73aee155854d9b5de7889c73847369f5b76983db12feb857b0dc6456%7C91f6ff7bd58fb71ea95b4e9206a0129a81b75cd4acd52fe223c0136aec781d66; authjs.callback-url=http%3A%2F%2Flocalhost%3A3000%2Flogin; authjs.session-token=eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIiwia2lkIjoiNDE2Q2hZTW9WeXVVdGpFQm1TY1ktd2JkZUhZa3FWa3puMnVmNGRlbUh5Si03WkZjVDJxUWtGRkRncUtMXy1fVXBqb1RCa29saFc4ZmtiNWJTb0dLeVEifQ..3CsaBcEBNMZseiUKR67erQ.r-SjrkNItv8b0jr8MRl_hdvTKrIpbWDT-E8B-0daQzmmRyNeaafXa7opDdg2YUiS6wqcpza5pzpEoS-NCUS12N6GwsjjuOy2xDIuhAlMNIEr8Cki7QLUxRwsOPv8Md5M1M_9aeO1ToFkfvKk0CIkvH40x1JTEZNrC-GyMXabErP3nMMS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_ga_GYS09X6KHS=GS1.1.1742194877.5.1.1742195518.0.0.0
Host: localhost:3000
Purpose: prefetch
Sec-Ch-Ua: '"Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133"'
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: '"macOS"'
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Sec-Purpose: prefetch;prerender
Upgrade-Insecure-Requests: "1"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
body: ""
timestamp: 2025-03-23T19:10:49.281526469Z
resp:
status_code: 404
header:
Connection: keep-alive
Content-Length: "63"
Content-Type: application/json; charset=utf-8
Date: Sun, 23 Mar 2025 19:10:49 GMT
Etag: W/"3f-BunLb98SCK6azHy0RO08GDnFBek"
Keep-Alive: timeout=5
X-Powered-By: Express
body: '{"message":"Cannot GET /","error":"Not Found","statusCode":404}'
status_message: Not Found
proto_major: 0
proto_minor: 0
timestamp: 2025-03-23T19:10:52.410725221Z
objects: []
assertions:
noise:
header.Date: []
created: 1742757052
curl: |
curl --request GET \
--url http://localhost:3000/ \
--header 'Upgrade-Insecure-Requests: 1' \
--header 'Sec-Fetch-User: ?1' \
--header 'Sec-Fetch-Mode: navigate' \
--header 'Connection: keep-alive' \
--header 'Sec-Purpose: prefetch;prerender' \
--header 'Sec-Fetch-Site: none' \
--header 'Purpose: prefetch' \
--header 'Accept-Encoding: gzip, deflate, br, zstd' \
--header 'Sec-Ch-Ua-Mobile: ?0' \
--header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36' \
--header 'Host: localhost:3000' \
--header 'Sec-Fetch-Dest: document' \
--header 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'Cookie: _ga=GA1.1.367374226.1739423302; _ga_8KGGHKN59H=GS1.1.1739423302.1.1.1739424012.0.0.0; _ga_QQYB8VTQR0=GS1.1.1739423302.1.1.1739424012.0.0.0; __next_hmr_refresh_hash__=06643411c8f2fbca41b184e6f40b6287633457081244afec; authjs.csrf-token=4f73518f73aee155854d9b5de7889c73847369f5b76983db12feb857b0dc6456%7C91f6ff7bd58fb71ea95b4e9206a0129a81b75cd4acd52fe223c0136aec781d66; authjs.callback-url=http%3A%2F%2Flocalhost%3A3000%2Flogin; authjs.session-token=eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIiwia2lkIjoiNDE2Q2hZTW9WeXVVdGpFQm1TY1ktd2JkZUhZa3FWa3puMnVmNGRlbUh5Si03WkZjVDJxUWtGRkRncUtMXy1fVXBqb1RCa29saFc4ZmtiNWJTb0dLeVEifQ..3CsaBcEBNMZseiUKR67erQ.r-SjrkNItv8b0jr8MRl_hdvTKrIpbWDT-E8B-0daQzmmRyNeaafXa7opDdg2YUiS6wqcpza5pzpEoS-NCUS12N6GwsjjuOy2xDIuhAlMNIEr8Cki7QLUxRwsOPv8Md5M1M_9aeO1ToFkfvKk0CIkvH40x1JTEZNrC-GyMXabErP3nMMS6gWavZcATzpF1khJCm6eB_QbuSF5U7oD741n7P80x18KJlQD4SSKvim2_SRC6aCuXtFZWBYVdcXMUe904dUg-VbwPFkdYx2V988vK2Ry1fL4u3GjZYgFnixg9il8UA5TGjs1hYgPg1_hBFw2CTAWXoS98GwgU4AwDPvQR_1dOT1zm95DXXNX_GZtxQ1I6BbWyPoNSsKmDGjec-QOkbRt1rRzLMtm4lJ_XUi-UB3ed3CjQsfecDOImmQ1zCtETVJ631WB6MVfAlHISe6Xl7ZLO7P2Yee5lcwhZTUfjPISwxu0SvNxRMFBmWiVnBmLHJ3CgxCHg3x6ZrbCXL8HLaKRosgmhLYfWFqX18xfv2cM8KWVjxuz1W2i9NN5HabDmfpBtYFjKLVWXhAi9Lzs5l-g6HUUKLVbSIU6UK81p2NDb8zb2AbCmabEnMcfAqUi1sEjBDw6J8wjcSn4h3AclD9gNgejUSPF5hKUFyVbdqMYDUfZWuZFNn9KeOw7Y4-vDdQGv2ejA6OeYcQDtR5wwRSBqhkpHGFekKmxu85L06TmtuIyFa-3Q5mV0jI9anWtmO3U01rDszN9Lg2wnCo1mJ1nYsYp2tq59-8elR-2Ovxd07VFQVp0e5e_rwbUm4BQTkExe9St1_TBx0-fDc967GLIdrNdWqZyKerW--8YxPR3pW6rpUUZcSVh6ikIgYBYgeFdwjhY7EOx9drwnZyYlGuaJ9gJAVO-JF4j2nujAxoeXlzodmnNImIylG6-Hwpj2D6UmVq5T0Gn0qVVwcMP5v9MYRNAW6LpEtTpmGxZgoaev2QaE191yLiWoiFLrqdHRSUwKxue9mZxgk2-uynQyUF_c3pWxi7Th5aF-D_V6jSkfbCY4BWfXKSKMYjlDQsYDSq5jobTJDIU4vod-I29JAmIiyGkTuPPcTlxJ0wjWj2z1zReackukjus8o3OU6hxUtUl82TiZ6z7YrjLM6m0dCR8h0V9D1CyteBJV1imHw.mqBoF7hKedUUS9jMEOTUPBzM54N3pjYPiJkoPGyaWWc; _clck=14qmaxi%7C2%7Cfua%7C0%7C1881; _ga_GYS09X6KHS=GS1.1.1742194877.5.1.1742195518.0.0.0' \
--header 'Sec-Ch-Ua: "Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133"' \
--header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
--header 'Sec-Ch-Ua-Platform: "macOS"' \
Loading