Create a web API First

1

I have created a web, separating the server from the web itself, now I am in a dilemma, if I have a Apache with the php offered by the API and another with the web that consumes the API. But these two Apache have to be on a single PC.

Are they separated by ports , the API by 8080 and the web by 80 ?

Or does this type of programming API first , require having two servers?

    
asked by albert 28.07.2017 в 17:01
source

1 answer

0

What this type of architecture allows is to undock the backend (API) of the frontend (Web) which would allow you in the future to be able to attend different channels (Mobile, Physical, Etc) from the same API, a possible configuration is the one you mention.

  • Server:
    • Apache
      • 80 (WEB)
      • 8080 (API)

Another possible is:

  • Server1:
    • Apache:
      • 80 (API)
  • Server2:
    • Apache:
      • 80 (WEB)
answered by 28.07.2017 / 17:09
source