Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Fcmam5 committed May 5, 2024
1 parent 7dbdb6c commit ddfbb8c
Show file tree
Hide file tree
Showing 13 changed files with 1,368 additions and 1,129 deletions.
18 changes: 18 additions & 0 deletions .vscode/launch.json
@@ -0,0 +1,18 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug Nest Framework",
"args": ["${workspaceFolder}/src/main.with-default-versioning.ts"],
"runtimeArgs": ["--nolazy", "-r", "ts-node/register", "-r", "tsconfig-paths/register"],
"sourceMaps": true,
"cwd": "${workspaceRoot}",
"protocol": "inspector"
}
]
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,7 @@
{
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#7aa9fb",
"activityBar.background": "#7aa9fb",
"activityBar.activeBackground": "#518ef9"
}
}
8 changes: 6 additions & 2 deletions README.md
Expand Up @@ -2,7 +2,7 @@

## Description <!-- omit from toc -->

A PoC for [nest#12567](https://github.com/nestjs/nest/pull/12567)
A PoC for [nest#12567](https://github.com/nestjs/nest/pull/12567) and [nest#13536](https://github.com/nestjs/nest/pull/13536)

- Example use case: https://stackoverflow.com/questions/77225518/using-subdomains-in-nestjs-with-fastify-adapter
- GH Issue: https://github.com/nestjs/nest/issues/12496
Expand All @@ -28,7 +28,11 @@ pnpm i
pnpm i /Users/fcmam5/lab/oss/nest/packages/platform-fastify
```

Run server with `pnpm start:dev`
Run server with:

- `s:d`To start the application with the `enableVersioning()` (uses URI by [default](https://docs.nestjs.com/techniques/versioning#versioning)) (runs: [`src/main.with-default-versioning.ts`](./src/main.with-default-versioning.ts))
- `s:v`To start the application with enabled versioning (uses HEADER for this example), runs: [`src/main.with-enabled-versioning.ts`](./src/main.with-enabled-versioning.ts)
- `s:nv`To start the application with no versioning, runs [`src/main.with-noversioning.ts`](./src/main.with-noversioning.ts)

<details>
<summary>we see that the constraints are set correctly.</summary>
Expand Down
13 changes: 8 additions & 5 deletions package.json
Expand Up @@ -10,20 +10,23 @@
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"s:d": "nest start --entryFile main.with-default-versioning --watch",
"s:v": "nest start --entryFile main.with-enabled-versioning --watch",
"s:nv": "nest start --entryFile main.with-noversioning --watch",
"start:debug": "nest start --entryFile main.with-default-versioning --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json"
"test:e2e": "jest --config ./test/jest-e2e.json",
"test:e2e-watch": "jest --config ./test/jest-e2e.json --watchAll"
},
"dependencies": {
"@nestjs/common": "^10.2.7",
"@nestjs/core": "^10.2.7",
"@nestjs/platform-fastify": "link:/Users/fcmam5/lab/oss/nest/packages/platform-fastify",
"@nestjs/core": "file:/Users/fcmam5/lab/oss/nest/packages/core/nestjs-core-10.3.8.tgz",
"@nestjs/platform-fastify": "file:/Users/fcmam5/lab/oss/nest/packages/platform-fastify/nestjs-platform-fastify-10.3.8.tgz",
"fastify": "^4.24.1",
"nest-problem-details-filter": "^0.1.0",
"reflect-metadata": "^0.1.13",
Expand Down

0 comments on commit ddfbb8c

Please sign in to comment.