-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
app.listen() callback? #4
Comments
I've seen this thing before. I would like to contribute. |
I'm unsure if this is needed, once const server = app.listen();
console.log(server.hostname); // http://0.0.0.0:3000/ I might be wrong though - let me know if I've missed something! |
Adding a callback like feature would be easy as this: class Bao {
listen(options: IListen = {}, cb?: () => void): Server {
const server = Bun.serve(this.#serve(options));
cb?.()
return server
}
} |
we can merge my pr actually for this. |
@fdemir Oh I did not notice 😅 awesome! |
Do we have such a thing?
The text was updated successfully, but these errors were encountered: