Skip to content

Commit

Permalink
backend: Renamed config.ts to environment.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed Jan 16, 2025
1 parent 93e4a65 commit f5b9701
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion backend/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ export * from './src/controllers/index.js';
export * from './src/services/index.js';
export * from './src/models/index.js';
export * from './src/helpers/index.js';
export * from './src/config.js';
export * from './src/environment.js';
export * from './src/config/index.js';
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { container } from '../../config/dependency-injector.config.js';
import { Request, Response } from 'express';
import { CALL_PRIVATE_ACCESS } from '../../config.js';
import { CALL_PRIVATE_ACCESS } from '../../environment.js';
import { LoggerService } from '../../services/logger.service.js';
import { GlobalPreferences } from '@typings-ce';

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion backend/src/middlewares/auth.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NextFunction, Request, Response } from 'express';
import basicAuth from 'express-basic-auth';

import { AuthService } from '../services/auth.service.js';
import { CALL_ADMIN_SECRET, CALL_ADMIN_USER, CALL_PRIVATE_ACCESS, CALL_SECRET, CALL_USER } from '../config.js';
import { CALL_ADMIN_SECRET, CALL_ADMIN_USER, CALL_PRIVATE_ACCESS, CALL_SECRET, CALL_USER } from '../environment.js';


// TODO: Implement the authMiddleware function
Expand Down
2 changes: 1 addition & 1 deletion backend/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import cors from 'cors';
import chalk from 'chalk';
import { indexHtmlPath, publicFilesPath } from './utils/path-utils.js';
import { apiRouter, livekitRouter } from './routes/index.js';
import { SERVER_PORT, SERVER_CORS_ORIGIN, logEnvVars } from './config.js';
import { SERVER_PORT, SERVER_CORS_ORIGIN, logEnvVars } from './environment.js';
import { embeddedRouter } from './routes/embedded.routes.js';
import { GlobalPreferencesService } from './services/index.js';
import { swaggerDocs, swaggerUi } from './config/swagger.js';
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
CALL_USER,
LIVEKIT_API_KEY,
LIVEKIT_API_SECRET
} from '../config.js';
} from '../environment.js';
import { AccessToken, AccessTokenOptions, TokenVerifier } from 'livekit-server-sdk';
import { injectable } from '../config/dependency-injector.config.js';

Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/livekit-webhook.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { DataTopic } from '../models/signal.model.js';
import { LiveKitService } from './livekit.service.js';
import { BroadcastingInfo, BroadcastingStatus } from '../models/broadcasting.model.js';
import { RecordingInfo, RecordingStatus } from '../models/recording.model.js';
import { LIVEKIT_API_KEY, LIVEKIT_API_SECRET } from '../config.js';
import { LIVEKIT_API_KEY, LIVEKIT_API_SECRET } from '../environment.js';
import { LoggerService } from './logger.service.js';
import { RoomService } from './room.service.js';
import { S3Service } from './s3.service.js';
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/livekit.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
StreamOutput,
VideoGrant
} from 'livekit-server-sdk';
import { LIVEKIT_API_KEY, LIVEKIT_API_SECRET, LIVEKIT_URL, LIVEKIT_URL_PRIVATE } from '../config.js';
import { LIVEKIT_API_KEY, LIVEKIT_API_SECRET, LIVEKIT_URL, LIVEKIT_URL_PRIVATE } from '../environment.js';
import { LoggerService } from './logger.service.js';
import { errorLivekitIsNotAvailable, errorParticipantAlreadyExists, internalError } from '../models/error.model.js';
import { TokenOptions } from '@typings-ce';
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/logger.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { injectable } from '../config/dependency-injector.config.js';
import winston from 'winston';
import { CALL_LOG_LEVEL } from '../config.js';
import { CALL_LOG_LEVEL } from '../environment.js';

@injectable()
export class LoggerService {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/openvidu-webhook.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { inject, injectable } from '../config/dependency-injector.config.js';
import { Room } from 'livekit-server-sdk';
import { LoggerService } from './logger.service.js';
import { CALL_WEBHOOK_URL } from '../config.js';
import { CALL_WEBHOOK_URL } from '../environment.js';

@injectable()
export class OpenViduWebhookService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { PreferencesStorage } from './global-preferences-storage.interface.js';
import { S3PreferenceStorage } from './s3-preferences-storage.js';
import { CALL_PREFERENCES_STORAGE_MODE } from '../../config.js';
import { CALL_PREFERENCES_STORAGE_MODE } from '../../environment.js';
import { inject, injectable } from '../../config/dependency-injector.config.js';
import { LoggerService } from '../logger.service.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { LoggerService } from '../logger.service.js';
import { PreferencesStorage } from './global-preferences-storage.interface.js';
import { GlobalPreferencesStorageFactory } from './global-preferences.factory.js';
import { OpenViduCallError } from '../../models/error.model.js';
import { CALL_NAME_ID } from '../../config.js';
import { CALL_NAME_ID } from '../../environment.js';
import { injectable, inject } from '../../config/dependency-injector.config.js';

@injectable()
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/recording.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { DataTopic } from '../models/signal.model.js';
import { LoggerService } from './logger.service.js';
import { RecordingInfo, RecordingStatus } from '../models/recording.model.js';
import { RecordingHelper } from '../helpers/recording.helper.js';
import { CALL_S3_BUCKET } from '../config.js';
import { CALL_S3_BUCKET } from '../environment.js';
import { RoomService } from './room.service.js';
import { inject, injectable } from '../config/dependency-injector.config.js';

Expand Down
4 changes: 2 additions & 2 deletions backend/src/services/redis.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { injectable } from '../config/dependency-injector.config.js';
import * as config from '../config.js';
import * as config from '../environment.js';
import { Redis, RedisOptions, SentinelAddress } from 'ioredis';
import {
REDIS_DB,
Expand All @@ -10,7 +10,7 @@ import {
REDIS_SENTINEL_HOST_LIST,
REDIS_SENTINEL_PASSWORD,
REDIS_USERNAME
} from '../config.js';
} from '../environment.js';
import { internalError } from '../models/error.model.js';

@injectable()
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/room.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { inject, injectable } from '../config/dependency-injector.config.js';
import { CreateOptions, DataPacket_Kind, Room, RoomServiceClient, SendDataOptions } from 'livekit-server-sdk';
import { LoggerService } from './logger.service.js';
import { LIVEKIT_API_KEY, LIVEKIT_API_SECRET, LIVEKIT_URL_PRIVATE, CALL_NAME_ID } from '../config.js';
import { LIVEKIT_API_KEY, LIVEKIT_API_SECRET, LIVEKIT_URL_PRIVATE, CALL_NAME_ID } from '../environment.js';
import { OpenViduCallError, errorRoomNotFound, internalError } from '../models/error.model.js';

@injectable()
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/s3.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
CALL_S3_SERVICE_ENDPOINT,
CALL_S3_SECRET_KEY,
CALL_S3_WITH_PATH_STYLE_ACCESS
} from '../config.js';
} from '../environment.js';
import { errorS3NotAvailable, internalError } from '../models/error.model.js';
import { Readable } from 'stream';
import { LoggerService } from './logger.service.js';
Expand Down

0 comments on commit f5b9701

Please sign in to comment.