Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Glydric committed Jan 26, 2024
1 parent ae76365 commit 2006750
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 217 deletions.
203 changes: 0 additions & 203 deletions Backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Backend/src/cameraStream/cameraStream.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { JwtService } from '@nestjs/jwt';
import { CSSOpenVidu } from './open-vidu.service';
import { ConnectionProperties, ConnectionType } from 'openvidu-node-client';
import { DatabaseService } from '../database/database.service';
import * as console from 'console';

@Catch(WsException, HttpException)
export class WsExceptionFilter implements WsExceptionFilter {
Expand Down
4 changes: 2 additions & 2 deletions Backend/src/database/database.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ export class DatabaseService {
const array = await this.getRawDataArray('General', {
name: 'NVR',
});

return {
ip: process.env.NVR_IP_ADDRESS,
channels: cameraIds,
channels: cameraIds,
};
}
}
12 changes: 4 additions & 8 deletions Backend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,18 @@ import { AppModule } from './app.module';
import { ValidationPipe } from '@nestjs/common';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import { IoAdapter } from '@nestjs/platform-socket.io';
const fs = require('fs');
import * as fs from 'fs';

async function bootstrap() {
const httpsOptions = {
key: fs.readFileSync(
process.env.PRIVATE_KEY
? process.env.PRIVATE_KEY
: `${__dirname}/ssl_certificate/server.key`,
process.env.PRIVATE_KEY ?? `${__dirname}/ssl_certificate/server.key`,
),
cert: fs.readFileSync(
process.env.SSL_CERTIFICATE
? process.env.SSL_CERTIFICATE
: `${__dirname}/ssl_certificate/server.crt`,
process.env.SSL_CERTIFICATE ?? `${__dirname}/ssl_certificate/server.crt`,
),
};
const app = await NestFactory.create(AppModule, { httpsOptions });
const app = await NestFactory.create(AppModule); //, { httpsOptions });
app.useGlobalPipes(new ValidationPipe());
// app.useWebSocketAdapter(new WsAdapter(app));
app.useWebSocketAdapter(new IoAdapter(app));
Expand Down
2 changes: 1 addition & 1 deletion Frontend/src/components/button/view-screenshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const ViewScreenshotButton: React.FC<PropsType> = ({
if (imageData) {
openModal({
title: timestamp,
modalContent: imageData,
modalContent: imageData.imageUrl,
isLoading: false,
});
}
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
- openvidu
restart: on-failure # always
ports:
- 8080:8080
- "8080:8080"
working_dir: /home/node
volumes:
- ./Backend:/home/node
Expand All @@ -44,7 +44,7 @@ services:
ports:
- "3000:3000"
env_file:
- ./Frontend/.env
- .secrets.yml
depends_on:
- backend

0 comments on commit 2006750

Please sign in to comment.