TheNoviceTrader
KPCKevin Powell - Community
•Created by Essay on 7/30/2023 in #front-end
How to make API calls to different environments?
How about this for an idea 💡 When running docker-compose up you use
--env-file ./config/.env.dev
Or
--env-file ./config/.env.test
Or
--env-file ./config/.env.prod
This sets it to run on a different port (82, 81, 80 or 8442, 8441, 443)
JavaScript then sets the API urls based on the port.
This should keep it to one code base.
8 replies
KPCKevin Powell - Community
•Created by Essay on 7/30/2023 in #front-end
How to make API calls to different environments?
What have you tried so far? And are you using docker with kubernetes?
8 replies
KPCKevin Powell - Community
•Created by TheNoviceTrader on 7/29/2023 in #front-end
How does margin-top: auto; work?
Thanks for all your help. I understand now and more importantly after reading a different part of mdm found the reasoning: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flexible_box_layout/Aligning_items_in_a_flex_container#alignment_and_flex-direction
16 replies
KPCKevin Powell - Community
•Created by TheNoviceTrader on 7/29/2023 in #front-end
How does margin-top: auto; work?
Like I said, what I've done works, I just don't understand why margin-top: auto calculates the correct value when in the mdm docs it says it would be 0?
16 replies
KPCKevin Powell - Community
•Created by TheNoviceTrader on 7/29/2023 in #front-end
How does margin-top: auto; work?
Yeah, I was reading mdm regarding margin, auto and margin-top: auto and it loosely said that it sets it to 0. But, when I use it as I have and the page doesn't have enough content (i.e usually the footer is not on the bottom), then it is correctly calculating the required value to push the footer to the bottom of the page. And if there is enough content then the value is 0 as expected.
16 replies