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
preguntada hace 10 meses191 visualizaciones
1 Respuesta
1
Respuesta aceptada

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
respondido hace 10 meses
  • Thank you for your answer! I will try as you told me.

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas