Preheat the oven to 350 degrees F. Grease an 8 1/2 x 4 1/2-inch loaf pan or an 8-inch square cake pan.
Sift together the coconut flour and baking powder, mixing to combine; set aside.
In a large, microwave-safe bowl, melt the butter with the cocoa, stirring until well blended.
Whisk the sugar, salt, vanilla, and eggs into the butter-cocoa mixture. Add the coconut flour and baking powder, whisking until smooth.
Pour the batter into the prepared pan. Let it rest for 10 minutes
Bake the loaf or cake until set, and a cake tester inserted into the middle comes out clean. This will take 35 to 45 minutes for the loaf pan, or 30 to 35 minutes for the square pan.
Cool the cake in the pan for 30 minutes before turning it out onto a rack to cool completely. The cake is easiest to slice when it’s completely cool.