In a large bowl, whisk together the flour, eggs, milk, salt, and nutmeg until smooth. Let the dough rest for 10 minutes.
Press the dough through a spaetzle press into boiling salted water. Cook until the noodles float to the surface, about 2-3 minutes. Drain.
In a large frying pan, melt the butter and cook the onions over medium heat until they are caramelized, about 15 minutes. Stir frequently.
Add the cooked spaetzle to the pan with the onions. Stir in the grated cheese until it melts and coats the noodles.
Serve the Käsespätzle immediately, topped with extra caramelized onions if desired.
