Skip to content

Commit

Permalink
Merge pull request #12 from unicam-complex-system/new-stream-integration
Browse files Browse the repository at this point in the history
New stream integration
  • Loading branch information
nabil-nablotech authored Jan 20, 2024
2 parents e5945b0 + 5233ba1 commit ebe958f
Show file tree
Hide file tree
Showing 42 changed files with 1,662 additions and 359 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ jobs:
CSD_PASSWORD: ${{ secrets.CSD_PASSWORD }}
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
BCRYPT_SALT: ${{ secrets.BCRYPT_SALT }}
OPENVIDU_URL: ${{ secrets.OPENVIDU_URL }}
OPENVIDU_SECRET: ${{ secrets.OPENVIDU_SECRET }}
14 changes: 14 additions & 0 deletions Backend/.env-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#SSL_CERTIFICATE=/path-to/server.crt
#PRIVATE_KEY=/path-to/server.key
LISTEN_PORT=8080
MONGO_PROTOCOL=mongodb
MONGO_HOST=localhost:27017
MONGO_INITDB_ROOT_USERNAME=root
MONGO_INITDB_ROOT_PASSWORD=123123
JWT_SECRET=RIpEW4QJCzEovH8wNsxv16aMiyGn0yNk
CSD_USER=root
CSD_PASSWORD=123123
TELEGRAM_TOKEN=TOKEN_FROM_TELEGRAM
BCRYPT_SALT=$2b$10$0H7uZ2aSzUll9k96X7EvHu
OPENVIDU_URL=http://localhost:4443/
OPENVIDU_SECRET=MY_SECRET
5 changes: 5 additions & 0 deletions Backend/.env-openvidu
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
OPENVIDU_SECRET=MY_SECRET
OPENVIDU_WEBHOOK=true
OPENVIDU_WEBHOOK_ENDPOINT=https://localhost:8080/media-server


10 changes: 9 additions & 1 deletion Backend/nest-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true
"deleteOutDir": true,
"assets": [
{
"include": "./ssl_certificate",
"outDir": "dist",
"watchAssets": true
}
],
"watchAssets": true
}
}
171 changes: 95 additions & 76 deletions Backend/package-lock.json

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

7 changes: 5 additions & 2 deletions Backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
"private": true,
"license": "GPL",
"scripts": {
"docker:start": "npm ci && nest start",
"docker:dev": "npm run docker:start -- --watch",
"docker:test": "npm ci && jest",
"build": "nest build",
"start": "npm ci && nest start",
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "npm start -- --debug --watch",
"start:prod": "node dist/main",
Expand Down Expand Up @@ -36,9 +39,9 @@
"dotenv": "^16.3.1",
"mongodb": "^6.3.0",
"node-telegram-bot-api": "^0.64.0",
"openvidu-node-client": "^2.29.0",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.8.1",
"simple-peer": "^9.11.1",
"ws": "^8.14.2"
},
"devDependencies": {
Expand Down
10 changes: 9 additions & 1 deletion Backend/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { TelegramService } from './telegram/telegram.service';
import { LoginController } from './app/login.controller';
import { CameraStreamGateway } from './cameraStream/cameraStream.gateway';
import { LoginService } from './login/login.service';
import { MediaServerController } from './app/mediaServer/mediaServer.controller';
import { CSSOpenVidu } from './cameraStream/open-vidu.service';

@Module({
imports: [
Expand All @@ -23,12 +25,18 @@ import { LoginService } from './login/login.service';
// signOptions: { expiresIn: "60s" },
}),
],
controllers: [MachineLearningController, FrontendController, LoginController],
controllers: [
MachineLearningController,
FrontendController,
LoginController,
MediaServerController,
],
providers: [
DatabaseService,
TelegramService,
CameraStreamGateway,
LoginService,
CSSOpenVidu,
],
exports: [DatabaseService, TelegramService],
})
Expand Down
Loading

0 comments on commit ebe958f

Please sign in to comment.