What war was going on while the star spangled banner was wrote?

the civil war