How did the ancient Chinese rockets work?

The gunpowder tubes were filled with gunpowder, with one end closed and the other end open. A small hole was left for the blasting fuse. When ignited, the gunpowder would burn inside the tube, producing a large amount of gas, which would produce enormous forward propulsion.