Preheat your oven to 350° F and grease your baking pan or dish. Dust with flour to ensure that your Coke cake doesn’t stick.
Whisk together the flour, baking soda, and salt in a large bowl until well combined and set aside.
Place a small saucepan over medium-high heat and add the Coke, butter, and cocoa powder. Bring the mixture to a soft boil making sure to stir occasionally. Remove from heat, then add it to the dry ingredients and stir.
Add the eggs, buttermilk (or whole milk if using), and vanilla to a small bowl and whisk to combine.
Pour the cake batter into the baking dish and bake for 45 to 55 minutes, or until the center is firm. Use a toothpick to determine whether it is cooked through.
Make the frosting. Place the Coke, butter, salt, cocoa powder, and powdered sugar into a large pot and stir. Heat your frosting ingredients over medium, being sure to stir occasionally. Bring the mixture to a boil and allow to cook for 15 minutes, then pour your homemade frosting over your Coke cake.
Allow the cake to cool and the frosting to firm up. Slice, serve, and enjoy!