Since Germany was facing this exact scenario of a two-front war at the beginning of World War I, Germany decided to enact the Schlieffen Plan.
While Russia continued to mobilize, Germany decided to attack France by going through neutral Belgium.
Armistice and the Versailles Treaty The fighting in the west continued for another year.
Millions more soldiers died, while little land was gained.
This gave Serbia time to get the backing of Russia, with whom they had a treaty. At the start of the war, these were the major players (more countries joined the war later): Germany didn't want to fight both Russia in the east and France in the west, so they enacted their long-standing Schlieffen Plan.