agile-learning-institute / mentorHub-search-api

Apache License 2.0
1 stars 0 forks source link

Add values to config of the API #15

Open MyNameIsAndrew-Mangix opened 5 months ago

MyNameIsAndrew-Mangix commented 5 months ago

Currently, the API Config() lacks setup for generating links to related services in the search UI. We need to enhance the config object to incorporate environment variables for specifying the hostname and port for different types of objects stored in the search database. This configuration is crucial for enabling the search UI to seamlessly link to other services.

When users perform a search, the search UI displays a list of index cards representing objects matching the search criteria. Each index card contains one or more links to edit the corresponding object. However, since the routes to these edit pages may reside on different ports, simple relative links are insufficient.

The current idea is to configure the hostname and port number for each service in DNS and pass them to the API via environment variables. This configuration will hopefully enable the API to dynamically generate correct links to related services based on the search results.

Any suggestions or ideas regarding the implementation are welcome and encouraged.