Cut the bacon and onion into bite-sized pieces.
Boil the spaghetti noodles in boiling water.
Heat olive oil in a pan and sauté the bacon and onion.
Add the cooked spaghetti to the pan and mix well.
Mix eggs, heavy cream, and Parmesan cheese to make the sauce.
Remove the pan from the heat and quickly mix in the sauce.
Finish by sprinkling black pepper.