Skip to content

Commit

Permalink
integrate backend with frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
Maleehak committed Apr 13, 2024
1 parent 7836059 commit 98a0d8c
Show file tree
Hide file tree
Showing 5 changed files with 356 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
package com.example.BriefMe;

import com.example.BriefMe.service.client.AudioExtractor;
import com.example.BriefMe.service.client.AudioToTextConverter;
import com.example.BriefMe.service.client.TextSummarizer;
import com.example.BriefMe.service.impl.AudioToTextConverterImpl;
import com.example.BriefMe.service.impl.CustomTextSummarizer;
import com.example.BriefMe.service.impl.YoutubeAudioExtractorImpl;
import java.io.IOException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@Slf4j
public class BriefMeApplication {

public static void main(String[] args){
SpringApplication.run(BriefMeApplication.class, args);
}
Expand Down
22 changes: 22 additions & 0 deletions backend/src/main/java/com/example/BriefMe/config/CorsConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.example.BriefMe.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;

@Configuration
public class CorsConfig {

@Bean
public CorsFilter corsFilter() {
CorsConfiguration corsConfig = new CorsConfiguration();
corsConfig.addAllowedOrigin("*");
corsConfig.addAllowedMethod("*");
corsConfig.addAllowedHeader("*");
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", corsConfig);
return new CorsFilter(source);
}
}
Loading

0 comments on commit 98a0d8c

Please sign in to comment.