How do I stay awake at work when I am at work and I start to nod off in front of my computer?

Evaluate last meal. 1) higher carbohydrate meals can lead to what is called "carb crash" - try to consume higher protein, which is a longer fuel, decreasing the chance of feeling tired. 2) improve lighting at your work space. 3) if you consume caffeine, do it with moderation and not all at once. 4) check the temperature of your work space.
Staying awak. Recommend that you get up and walk about at least every hour. Consider having a desk that moves to variable heights so that you can also stand at desk. Do you fall asleep after a meal ?- if yes, consider a smaller meal with lower carbs. How well do you sleep at night? Make sure you are getting adequate sleep. Are your bored?