guilhermebkel / uno-game

:flower_playing_cards: An UNO Game made in Javascript
https://uno.guilherr.me
MIT License
207 stars 59 forks source link

Example nginx configuration #10

Closed luclu7 closed 3 years ago

luclu7 commented 3 years ago

Hi,

I'm trying to setup this app with an Nginx reverse proxy (mostly for HTTPS), I'd like to know if you have a guide on/know how to setup it that way.

Thank you for making this!

guilhermebkel commented 3 years ago

Hello @luclu7 😄! Thanks for getting in touch! At first I recommend you to try it on your machine just to understand how to run this game (it can help you setting up it later on some server). Below you can see a basic setup idea:

Setup Idea

To setup this game (with nginx or another resources) you can take the generic idea:

  1. You have to build a component (front-end or back-end)
  2. You have to add the component environment variables (try not to forget adding the env variables using .env.example file that exists inside each component)
  3. You need to execute the builded component (you can use Docker or even run it directly on server)
  4. You have to expose the running component on internet (reverse proxy)

Basic Setup

Being minded about the idea above, a basic setup with nginx (supposing that a server is already setup and running) would be:

Guides

  1. HTTPS setup: https://www.digitalocean.com/community/tutorials/how-to-set-up-let-s-encrypt-with-nginx-server-blocks-on-ubuntu-16-04
  2. Nginx setup: https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-18-04
  3. Nginx for front-end: https://medium.com/@timmykko/deploying-create-react-app-with-nginx-and-ubuntu-e6fe83c5e9e7
  4. Nginx for back-end: https://www.tecmint.com/nginx-as-reverse-proxy-for-nodejs-app

In case you have some trouble setting it up, I'm totally opened to help you doing that! 🤘 Just send me some message and I will reply it asap 😁.

agakcw12 commented 2 years ago

image

agakcw12 commented 2 years ago

i have this problem to build the api