Skip to content

Commit c0d6520

Browse files
committed
room & setup
1 parent f6f5cd4 commit c0d6520

File tree

128 files changed

+4974
-528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+4974
-528
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ testem.log
3737
# System Files
3838
.DS_Store
3939
Thumbs.db
40+
asterisk.pem
41+
.env

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v12.18.2

.prettierrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"singleQuote": true
3-
}
2+
"singleQuote": true,
3+
"semi": false
4+
}

angular.json

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"aot": true,
5050
"assets": ["apps/webapp/src/favicon.ico", "apps/webapp/src/assets"],
5151
"styles": ["apps/webapp/src/styles.scss"],
52+
"allowedCommonJsDependencies": ["socket.io-client"],
5253
"scripts": []
5354
},
5455
"configurations": {
@@ -84,7 +85,8 @@
8485
"serve": {
8586
"builder": "@angular-devkit/build-angular:dev-server",
8687
"options": {
87-
"browserTarget": "webapp:build"
88+
"browserTarget": "webapp:build",
89+
"proxyConfig": "apps/webapp/proxy.conf.json"
8890
},
8991
"configurations": {
9092
"production": {
@@ -142,6 +144,99 @@
142144
}
143145
}
144146
}
147+
},
148+
"gateway": {
149+
"root": "apps/gateway",
150+
"sourceRoot": "apps/gateway/src",
151+
"projectType": "application",
152+
"prefix": "gateway",
153+
"architect": {
154+
"build": {
155+
"builder": "@nrwl/node:build",
156+
"outputs": ["{options.outputPath}"],
157+
"options": {
158+
"outputPath": "dist/apps/gateway",
159+
"main": "apps/gateway/src/main.ts",
160+
"tsConfig": "apps/gateway/tsconfig.app.json",
161+
"assets": ["apps/gateway/src/assets"]
162+
},
163+
"configurations": {
164+
"production": {
165+
"optimization": true,
166+
"extractLicenses": true,
167+
"inspect": false,
168+
"fileReplacements": [
169+
{
170+
"replace": "apps/gateway/src/environments/environment.ts",
171+
"with": "apps/gateway/src/environments/environment.prod.ts"
172+
}
173+
]
174+
}
175+
}
176+
},
177+
"serve": {
178+
"builder": "@nrwl/node:execute",
179+
"options": {
180+
"buildTarget": "gateway:build"
181+
}
182+
},
183+
"lint": {
184+
"builder": "@nrwl/linter:eslint",
185+
"options": {
186+
"lintFilePatterns": ["apps/gateway/**/*.ts"]
187+
}
188+
},
189+
"test": {
190+
"builder": "@nrwl/jest:jest",
191+
"outputs": ["coverage/apps/gateway"],
192+
"options": {
193+
"jestConfig": "apps/gateway/jest.config.js",
194+
"passWithNoTests": true
195+
}
196+
}
197+
}
198+
},
199+
"core-entity": {
200+
"root": "libs/core/entity",
201+
"sourceRoot": "libs/core/entity/src",
202+
"projectType": "library",
203+
"architect": {
204+
"lint": {
205+
"builder": "@nrwl/linter:eslint",
206+
"options": {
207+
"lintFilePatterns": ["libs/core/entity/**/*.ts"]
208+
}
209+
},
210+
"test": {
211+
"builder": "@nrwl/jest:jest",
212+
"outputs": ["coverage/libs/core/entity"],
213+
"options": {
214+
"jestConfig": "libs/core/entity/jest.config.js",
215+
"passWithNoTests": true
216+
}
217+
}
218+
}
219+
},
220+
"core-stream": {
221+
"root": "libs/core/stream",
222+
"sourceRoot": "libs/core/stream/src",
223+
"projectType": "library",
224+
"architect": {
225+
"lint": {
226+
"builder": "@nrwl/linter:eslint",
227+
"options": {
228+
"lintFilePatterns": ["libs/core/stream/**/*.ts"]
229+
}
230+
},
231+
"test": {
232+
"builder": "@nrwl/jest:jest",
233+
"outputs": ["coverage/libs/core/stream"],
234+
"options": {
235+
"jestConfig": "libs/core/stream/jest.config.js",
236+
"passWithNoTests": true
237+
}
238+
}
239+
}
145240
}
146241
}
147242
}

apps/gateway/.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "extends": "../../.eslintrc.json", "ignorePatterns": ["!**/*"], "rules": {} }

apps/gateway/jest.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
displayName: 'gateway',
3+
preset: '../../jest.preset.js',
4+
globals: {
5+
'ts-jest': {
6+
tsConfig: '<rootDir>/tsconfig.spec.json',
7+
},
8+
},
9+
transform: {
10+
'^.+\\.[tj]s$': 'ts-jest',
11+
},
12+
moduleFileExtensions: ['ts', 'js', 'html'],
13+
coverageDirectory: '../../coverage/apps/gateway',
14+
};

apps/gateway/src/app.module.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Module } from '@nestjs/common';
2+
import { SignalingModule } from './signaling/signaling.module';
3+
import { AuthModule } from './auth/auth.module';
4+
5+
@Module({
6+
imports: [SignalingModule, AuthModule],
7+
controllers: [],
8+
providers: [],
9+
})
10+
export class AppModule {}

apps/gateway/src/assets/.gitkeep

Whitespace-only changes.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { Test, TestingModule } from '@nestjs/testing';
2+
import { AuthController } from './auth.controller';
3+
import { AuthService } from './auth.service';
4+
5+
describe('AuthController', () => {
6+
let controller: AuthController;
7+
8+
beforeEach(async () => {
9+
const module: TestingModule = await Test.createTestingModule({
10+
controllers: [AuthController],
11+
providers: [AuthService],
12+
}).compile();
13+
14+
controller = module.get<AuthController>(AuthController);
15+
});
16+
17+
it('should be defined', () => {
18+
expect(controller).toBeDefined();
19+
});
20+
});
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { Controller, Get, Post, Body, Put, Param, Delete } from '@nestjs/common';
2+
import { AuthService } from './auth.service';
3+
import { CreateAuthDto } from './dto/create-auth.dto';
4+
import { UpdateAuthDto } from './dto/update-auth.dto';
5+
6+
@Controller('auth')
7+
export class AuthController {
8+
constructor(private readonly authService: AuthService) {}
9+
10+
@Post()
11+
create(@Body() createAuthDto: CreateAuthDto) {
12+
return this.authService.create(createAuthDto);
13+
}
14+
15+
@Get()
16+
findAll() {
17+
return this.authService.findAll();
18+
}
19+
20+
@Get(':id')
21+
findOne(@Param('id') id: string) {
22+
return this.authService.findOne(+id);
23+
}
24+
25+
@Put(':id')
26+
update(@Param('id') id: string, @Body() updateAuthDto: UpdateAuthDto) {
27+
return this.authService.update(+id, updateAuthDto);
28+
}
29+
30+
@Delete(':id')
31+
remove(@Param('id') id: string) {
32+
return this.authService.remove(+id);
33+
}
34+
}

0 commit comments

Comments
 (0)