I'd like to deploy React,nodejs project.

0

My project has two folder in big way, client, server. Sever project is written of node.js and I used mongoose also. client project is written of javasciprt while I'm in develop, I used local host and 5000 port for server, and 3000 port for client. And I used proxy for interacting between them. That time, npm run start, script makes server and client project are activated concurrently.

I did some process to deploy project.

  1. I made ec2 instance.
  2. I connect ssh
  3. I cloned project using git.
  4. I installed npm, monogod, nodejs

but I'm stucked with further steps. So, I have some questions.

  1. how to deal with my dot.env file(It was used for api key(mongo, kakaomap)) ? should I make in ssh terminal?
  2. In now, my address site show that they can't connect. should I install something else for connecting my project with them? I installed nginx but it's not work. it said I don't have authentication.
jim
질문됨 10달 전191회 조회
1개 답변
1
수락된 답변

For api keys, you can use aws secrets manager and call it using the sdk to get the keys. Or aws parameter store with Secure String (encrypted) parameters.

For the frontend and static content, i would consider using cloudfront in front of s3. Exposing the backend can be done with application load balancer or api gateway (with a suitable authentication solution, depending who the clients are, eg with amazon cognito).

Oren
답변함 10달 전
  • Thank you for your answer! I will try as you told me.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠