Skip to content

Commit ab535dc

Browse files
committed
Cleanup
1 parent 5cd9471 commit ab535dc

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ To run the backend application:
3434
* From Gradle: `./gradlew bootRun`
3535
* From IDE: Run the `CourseHubApplication` main class.
3636

37-
Now you can access the CourseHub UI on `http://localhost:5173` and the backend API on `http://localhost:8080`.
37+
Now you can access the CourseHub UI on `http://localhost:80` and the backend API on `http://localhost:8080`.
3838

3939
### Making requests
4040

@@ -47,7 +47,7 @@ You can also see all available endpoints in the [OpenAPI documentation](http://l
4747

4848
### Running the frontend
4949

50-
By default you get the the frontend running on `http://localhost:5173` from a docker compose, if you want to run it locally, follow the steps below.
50+
By default you get the the frontend running on `http://localhost:80` from a docker compose, if you want to run it locally, follow the steps below.
5151

5252
To install the required dependencies (only once), from the `ui` directory, run:
5353

@@ -61,6 +61,8 @@ To run the frontend application locally, from the `ui` directory, run:
6161
npm run dev
6262
```
6363

64+
With this you can now access the CourseHub UI on `http://localhost:5173` in development mode.
65+
6466
### Building docker images
6567

6668
To build a Docker image of the course-hub backend, run the following command:

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
1919
environment:
2020
BACKEND_URL: http://localhost:8080
2121
ports:
22-
- "5173:80"
22+
- "80:80"
2323
course-hub-backend:
2424
image: ghcr.io/hackyourfuture/course-hub-backend:latest
2525
container_name: course-hub

src/main/java/net/hackyourfuture/coursehub/CourseHubApplication.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import org.springframework.boot.SpringApplication;
44
import org.springframework.boot.autoconfigure.SpringBootApplication;
5-
import org.springframework.context.annotation.Bean;
6-
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
75

86
@SpringBootApplication
97
public class CourseHubApplication {
@@ -12,17 +10,4 @@ public static void main(String[] args) {
1210
SpringApplication.run(CourseHubApplication.class, args);
1311
}
1412

15-
@Bean
16-
public WebMvcConfigurer corsConfigurer() {
17-
return new WebMvcConfigurer() {
18-
@Override
19-
public void addCorsMappings(org.springframework.web.servlet.config.annotation.CorsRegistry registry) {
20-
registry.addMapping("/**")
21-
.allowedOrigins("http://localhost:5173")
22-
.allowedMethods("DELETE", "GET", "OPTIONS", "POST", "PATCH", "PUT")
23-
.allowedHeaders("*")
24-
.allowCredentials(true);
25-
}
26-
};
27-
}
2813
}

0 commit comments

Comments
 (0)