KostaSav / hp-api

A simple JSON-based API for getting information on Harry Potter characters.
192 stars 87 forks source link

Configure URLs under index.html to point to the corresponding host (Render, Heroku) #85

Open KostaSav opened 3 months ago

KostaSav commented 3 months ago

Example:

  1. when https://hp-api.onrender.com/ is used, then the route to All Characters should point to https://hp-api.onrender.com/api/characters
  2. when https://hp-api.herokuapp.com/ is used, then the route to All Characters should point to https://hp-api.herokuapp.com/api/characters

The URLs should be made configurable, which means that they will be stored somewhere and based on the host used, the corresponding API basepath is invoked.