Skip to content

Commit

Permalink
add api url (render.com)
Browse files Browse the repository at this point in the history
add origin for CORS
  • Loading branch information
cichy380 committed Jan 15, 2024
1 parent cce2447 commit 5a4156d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { AppModule } from './app/app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
const globalPrefix = 'api';
app.enableCors();
app.enableCors({origin: 'https://cichy380.github.io'});
app.setGlobalPrefix(globalPrefix);
const port = process.env.PORT || 3000;
await app.listen(port);
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/app/audio-processing.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { Observable } from 'rxjs';

@Injectable()
export class AudioProcessingService {
private readonly serverUrl = 'http://localhost:3000/api';

private readonly serverUrl = 'https://speech-to-text-rnx2.onrender.com/api';

constructor(private http: HttpClient) {
}
Expand Down

0 comments on commit 5a4156d

Please sign in to comment.