Skip to content

Commit 53aa75f

Browse files
committed
refactor: 기본 포트 8080으로 변환
1 parent 045c610 commit 53aa75f

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

app/src/main/resources/static/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ <h2 class="major__title">Infra</h2>
138138
console.error('Server responded with non-OK status');
139139
localStorage.clear();
140140
document.cookie = 'sessionId=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
141-
window.location.href = "http://localhost:8086/";
141+
window.location.href = "http://localhost:8080/";
142142
}
143143
})
144144
.catch((error) => {
145145
console.error('Error:', error);
146146
localStorage.clear();
147147
document.cookie = 'sessionId=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
148-
window.location.href = "http://localhost:8086/";
148+
window.location.href = "http://localhost:8080/";
149149
});
150150
});
151151
}

app/src/main/resources/static/my-info.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ <h4 class="mb-3">회원 상세정보</h4>
6868
password: document.getElementById('password').value
6969
};
7070

71-
fetch('http://localhost:8086/api/users', {
71+
fetch('http://localhost:8080/api/users', {
7272
method: 'PUT',
7373
headers: {
7474
'Content-Type': 'application/json',

app/src/main/resources/static/sign-in.html

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ <h1>If you're first-com</h1>
9898
document.querySelector('.sign-up-container form').addEventListener('submit', function (event) {
9999
event.preventDefault();
100100
var xhr = new XMLHttpRequest();
101-
xhr.open("POST", "http://localhost:8086/sign-up", true);
101+
xhr.open("POST", "http://localhost:8080/sign-up", true);
102102
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
103103
xhr.onload = function () {
104104
if (xhr.status === 200 || xhr.status === 301) {
105105
alert("회원가입이 완료되었습니다.");
106-
window.location.href = "http://localhost:8086/sign-in.html";
106+
window.location.href = "http://localhost:8080/sign-in.html";
107107
} else {
108108
alert("회원가입에 실패했습니다.");
109109
}
@@ -121,17 +121,12 @@ <h1>If you're first-com</h1>
121121
event.preventDefault();
122122

123123
var xhr = new XMLHttpRequest();
124-
xhr.open("POST", "http://localhost:8086/sign-in", true);
124+
xhr.open("POST", "http://localhost:8080/sign-in", true);
125125
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
126126
xhr.onload = function () {
127127
if (xhr.status === 200 || xhr.status === 301) {
128-
// var logined = xhr.getResponseHeader("logined");
129-
// if (logined) {
130128
localStorage.setItem("logined", true);
131-
window.location.href = "http://localhost:8086/";
132-
// } else {
133-
// alert("로그인에 실패했습니다.");
134-
// }
129+
window.location.href = "http://localhost:8080/";
135130
} else {
136131
alert("Error: " + xhr.status);
137132
}

mvc/src/main/java/project/server/mvc/tomcat/PortFinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ private PortFinder() {
88

99
private static final int MIN_PORT_NUMBER = 1;
1010
private static final int MAX_PORT_NUMBER = 65535;
11-
private static final int DEFAULT_PORT = 8086;
11+
private static final int DEFAULT_PORT = 8080;
1212

1313
public static int findPort(String[] args) {
1414
if (args == null || args.length == 0) {

0 commit comments

Comments
 (0)