inflearn logo
강의

講義

知識共有

フォローして学ぶノード、リアクトシリーズ - 基本講義

ノードリアクト基礎講義#34認証チェック(2)講義仕上げ。

heroku 배포에 대해 질문이 있습니다..

289

Aurora

投稿した質問数 19

0

https://www.youtube.com/watch?v=qdoiwouykAg

에서 heroku 배포를 진행중입니다.

예제를 따라하고 이제 배포를 하려고 했는데 화면이 저렇게만 뜨는데 왜이런걸까요...

로컬에서는 로그인과 회원가입까지 잘되는데.. heroku 로그를 보면

MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://docs.atlas.mongodb.com/security-whitelist/

이런 에러로그입니다... 이유가 뭘까요..

react nodejs

回答 2

1

John Ahn

안녕하세요 ~ 

MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://docs.atlas.mongodb.com/security-whitelist/


이 에러는 방화벽에 관한 에러 입니다 ~   
몽고DB 사이트에 가서  whitelist를 현재 위치를 넣어줄수 있는 곳이 있습니다. 
그곳에서  현재 IP를 넣어주셔서 방화벽을 열어주세요 ~  

0

Aurora

위의 에러로그는 몽고DB 접속 IP관련 에러로

0.0.0.0/0 로 설정해서 connected되었습니다.

하지만 문제는.. 배포를 했을 때 나오는 페이지가 저렇게 Hello World가 나오는데 왜 이렇게 나오는지 잘 모르겠습니다 ㅠ.ㅠ

창을 열면 2020-11-18T15:31:25.610436+00:00 heroku[router]: at=info method=GET path="/" host=lit-bastion-23296.herokuapp.com request_id=39bba0f1-dba7-4be5-b58a-c2aac7d45760 fwd="122.43.26.91" dyno=web.1 connect=1ms service=3ms status=304 bytes=150 protocol=https

이런 로그가 뜹니다,.

setupProxy.js 만든파일에서 뭔가 문제가 있는걸까요??

const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = function (app) {
  app.use(
    '/api',
    createProxyMiddleware({
      target: 'http://localhost:5000',
      changeOrigin: true,
    }),
  );
};
target에 로컬이라고 되어있어서.. 찜찜합니다..
https://lit-bastion-23296.herokuapp.com/
사이트 주소입닏...

깃 이메일이랑 비번이 필요하다고 하네요

0

32

1

404 에러

0

101

1

34강 인증 체크에서 element 사용 때문에 에러나시는 분들 이렇게 하심 됩니다.

0

118

1

로그인, 로그아웃, 토근 작동 안 함

0

237

0

9강 오류 어떻게 해결하나요?

0

192

1

localhost 에서 연결을 거부했습니다.

0

1921

4

포스트맨에서 true가 안떠요

0

150

1

왜 안되나요

0

128

1

몽고db 연결 오류가 납니다 위에껀 입력한 코드, 아래껀 터미널이에요

0

242

1

로그아웃 401 에러(Unauthorized)

0

501

2

암호가 해싱되지 않고 입력값 그대로 db에 저장되는 문제

0

147

1

7강중에서

0

162

2

User.findByToken is not a function

0

210

1

루트 디렉토리

0

268

1

useState

0

559

1

프록시 잘 설정했는데도 404 오류 뜨는 분들

5

874

6

webpack 관련 에러 질문

0

218

1

리액트 관련 질문

0

271

1

14강 로그아웃 안됨

0

315

1

mongoDB 데이터 확인하는 법

0

407

1

postman 에러

0

289

1

선생님 리덕스를 사용하면 어떠한 부분이 좋은지 알 수 있을까요?

0

231

1

다음과 같은 에러들이 발생합니다.

0

269

1

14강 로그아웃 기능 구현시 postman에서 Cannot POST 오류가 뜹니다.

0

377

1