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
asked 9 months ago181 views
1 Answer
1
Accepted Answer

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
answered 9 months ago
  • Thank you for your answer! I will try as you told me.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions