Skip to content

Commit

Permalink
Merge pull request #119 from tukcomCD2024/Backend#94/nodejs2
Browse files Browse the repository at this point in the history
feat : local에서 테스트하기 위한 설정
  • Loading branch information
Doncham authored Mar 18, 2024
2 parents 7c55cff + 2dda59c commit 34a9cb7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions backend/shareNote/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ services:
environment:
S3_ACCESS_KEY: ${S3_ACCESS_KEY}
S3_SECRET_KEY: ${S3_SECRET_KEY}
JWT_SECRET_KEY: ${JWT_SECRET_KEY}
RABBIT_HOST: rabbitmq
depends_on:
- mongodbService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class WebConfig implements WebMvcConfigurer{
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
// .allowedOrigins("http://localhost") // local용
.allowedOrigins("http://sharenote.shop","https://sharenote.shop") // 배포시 변경
.allowedOrigins("http://sharenote.shop","https://sharenote.shop","http://localhost:3000") // 배포시 변경
.allowedMethods("GET", "POST", "PUT", "DELETE")
.allowedHeaders("Authorization", "Content-Type")
.exposedHeaders("Custom-Header")
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Component/Page/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function Page() {
const roomId = noteId;
const ydoc = getYDocInstance(roomId);
const provider = new WebsocketProvider(
"wss://demos.yjs.dev/ws", // 웹소켓 서버 주소
"ws://localhost:4000", // 웹소켓 서버 주소, // 웹소켓 서버 주소
roomId, // 방 이름
ydoc
);
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/setupProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ module.exports = function(app) {
app.use(
'/api',
createProxyMiddleware({
target: 'https://sharenote.shop:8080', // 서버 URL or localhost:설정한포트번호
target: 'http://localhost:8080', // 서버 URL or localhost:설정한포트번호
//target: 'https://sharenote.shop:8080', // 서버 URL or localhost:설정한포트번호
changeOrigin: true,
})
);
Expand Down

0 comments on commit 34a9cb7

Please sign in to comment.