Why is Boston Called Beantown?

Ever heard of Boston baked beans? Kinda complicated aanwer really. I guess in colonial times Boston was part of the ‘sugar trade’ and because of this, there was always a supply of molasses; folks started using molasses to sweeten their beans; thus baked beans; thus beantown.