Deploy a React App with ExpressJS and Nginx

Поділитися
Вставка
  • Опубліковано 12 гру 2024

КОМЕНТАРІ • 14

  • @lucha0075db
    @lucha0075db Рік тому

    Nice tutorial Enrico. I was wondering, what about if I want to make a request to the nginx server's endpoint from the react front end ?

  • @saturnorbit6810
    @saturnorbit6810 2 роки тому +1

    What if you want routing to work?

  • @andresarandaarpe3522
    @andresarandaarpe3522 3 роки тому +1

    Thanks, with this method is it possible the prerender for seo?

  • @bilal.comedy
    @bilal.comedy 2 роки тому

    Thanks, if I load react via express, where do I have to implement the API call. In the React app or in Epress Server.js

    • @EnricoPortolan
      @EnricoPortolan  2 роки тому +1

      On the Express server you implement the API itself. You call the API from your React App

  • @saturnorbit6810
    @saturnorbit6810 2 роки тому

    Actually is this SEO friendly or no??

    • @supernovaw39
      @supernovaw39 Рік тому

      There is no SSR in the example, so no.

  • @BP-qy2pb
    @BP-qy2pb 3 роки тому

    May I ask what's the difference between
    react + express + nginx
    vs
    react + nginx?

    • @EnricoPortolan
      @EnricoPortolan  3 роки тому

      Sure, the one with expressJS is actually ExpressJS that serves the static files whereas the other one is NGINX serving the static files :)

    • @BP-qy2pb
      @BP-qy2pb 3 роки тому

      @@EnricoPortolan thanks!
      another question.
      which one do you recommend for routing frontend service? Express or nginx?

    • @EnricoPortolan
      @EnricoPortolan  3 роки тому

      @@BP-qy2pb I'd go with Nginx serving the static files because it's simpler to split your client side from your API server

    • @leamon9024
      @leamon9024 2 роки тому +2

      @@EnricoPortolan Hi, thanks for sharing. I have the exact same question. If react + nginx works faster and simpler, why should we use another express to serve? Is there any advantage about this architecture? Thanks

  • @mohamedoufi842
    @mohamedoufi842 2 роки тому

    no detail !