Did the Chinese use fireworks as weapons?

I'm pretty sure the Chinese used them as rockets