Based on your question, I assume you have 2 services, one of which serves an API and another your frontend code, because Bun doesn't run your frontend, your browser does.
So assuming you mean 2 services, you can call Bun.serve twice in 1 process if you want to, or just run bun twice on 2 entry points.
Does that make sense. If not, where do you get stuck?