Andy Carroll scored the only goal of the game 13 minutes from time, handing West Ham their first win in seven games.
Allardyce believes that it was no more than they deserved, and that they should have scored even more goals.
"We were under big pressure today to produce a result," Allardyce added.
"I thought we thoroughly deserved the win. The way we've been playing at home has been fantastic all year.
"It brought us the victory, but it was a shame it wasn't by more."
The win moves the Hammers up to 11th in the Premier League table, while Swansea stay in eighth place.