5 글 보임 - 1 에서 5 까지 (총 5 중에서)
-
글쓴이글
-
2023년 3월 23일 14:40 #73331
이순민참가자제목과 그대로 MongoDB에서 Search 카테고리를 통해 검색기능을 만들었는데 Vscode에서 서버를 켜서 localhost로 이동하여 검색기능을 이용하면 작동하지만 구글 배포 후에는 검색을 하면 "Internal Server Error" 이라는 오류가 뜹니다. 왜 이런현상이 일어나는지 혹시 관련 이슈가 다른 학생분들에게도 있는건지 궁금합니다.
2023년 3월 24일 15:40 #73466
이순민참가자이거 맞을까요? 좀 희한한건 구글 배포(https://airy-actor-378805.du.r.appspot.com/)에서는 로그인 전에는 검색됩니다. 로그인 후에만 안됩니다. localhost에선 로그인 전 후 둘다 검색기능 가능하구요. ------------------------------------userindexList-----------------------------------
<!doctype html> <html>
<head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link href="/public/style.css" rel="stylesheet"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<title>Hello, world!</title> </head>
<body> <%- include ('usernav.html') %>
<div class="w-50 board-area" style="float: none; margin:0 auto;"> <table class="table table-hover"> <thead> <tr bgcolor="#BDBDBD" font color="white"> <th>번호</th> <th>제목</th> <th>글쓴이</th> <th>작성일</th> </tr> </thead> <tbody> <% for (let i=0; i < searchWord.length; i++){ %> <tr style="cursor:pointer" onclick="location.href='/detail/<%= searchWord[i]._id %>'"> <td><%= searchWord[i]._id %></td> <td><%= searchWord[i].title %></td> <td><%= searchWord[i].userNick %></td> <td><%= searchWord[i].date %></td> </tr> <% } %> </tbody> </table> <div style="display: flex; justify-content: flex-end;"> <button type="button" class="btn btn-primary" style="margin: 3px;" id="PostWrite">작성하기</button> </div> </div>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script> <script> // 작성하기 버튼 클릭시 작성페이지로 이동 $('#PostWrite').click(function(){ location.replace('/write'); })
$('#userLogout').click(function(){ $.ajax({ url : "/logout", type : "GET", success : function(결과){ location.replace('/') } }) })
$('#userTitleSearch').click(function(){ var 입력값 = $('#userTitleSearch-input').val() console.log('입력값은 = '+입력값); window.location.replace(`/usersearch?value=${입력값}`) }) </script>
<!-- Optional JavaScript --> <!-- jQuery first, then Popper.js, then Bootstrap JS --> <!-- <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script> --> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script> </body>
</html> ------------------------------------userindexList-----------------------------------
-
글쓴이글
5 글 보임 - 1 에서 5 까지 (총 5 중에서)
- 답변은 로그인 후 가능합니다.