Should I go to the Dr or wait this out ?? TMI

I might have ate something bad yesterday or something But this morning I woke up with the worse stomach pains ever. Like so so so bad. I can't take them. I have bad diahrrea now and I'm throwing up so much. But this stomach pain. I can't take it. Im 32 weeks pregnant right now. I don't know if I should just deal with this at home or if this is something that can harm baby and I should go to Dr. ?