Open sajeetharan opened 1 year ago
Maybe just use the appsettings file and override the Kestrel or IIS endpoint(s) there? Dab uses aspnet, so if not hardcoded, you can use its config to change ports. Lots of options in the docs: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/endpoints?view=aspnetcore-6.0
This needs more discussion to accommodate or exclude swa and hot reload. Kestrel config occurs before any config read/parsing mechanism takes place.
Some other option to use it, is to run DAB by Docker Container with custom port config.
docker run -it --rm -v "%cd%\swa-db-connections:/App/swa-db-connections" -p 5033:5000 --env DATABASE_CONNECTION_STRING="%DATABASE_CONNECTION_STRING%" mcr.microsoft.com/azure-databases/data-api-builder:0.10.21 --ConfigFileName ./swa-db-connections/staticwebapp.database.config.json
Would be nice to have port configuration in CLI.
Maybe just use the appsettings file and override the Kestrel or IIS endpoint(s) there? Dab uses aspnet, so if not hardcoded, you can use its config to change ports. Lots of options in the docs: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/endpoints?view=aspnetcore-6.0
Hi @wrutkowski-xebia Until DAB cli offers the ability to update port, please consider using @Bysza's suggestion. The port settings are picked up from appsettings.json
What happened?
We need to provide CLI or config file option for choosing ports other than 5000 or 5001 for http and https.
For example : While developing locally or host two APIs simultaneously on distinct ports.
Version
0.6.14
What database are you using?
CosmosDB NoSQL
What hosting model are you using?
Local (including CLI)
Which API approach are you accessing DAB through?
GraphQL
Relevant log output
No response
Code of Conduct