How can I change the message: 'Started server http://localhost:3000' #2977
-
I've been searching for the strings "Started" and "Started server" without any luck. Could it be possible to modify this string that prints every time the server is started? I'm using Bun btw. Thanks for the help! Adrián |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
This is a question regarding Bun and I don't think Hono is involved. |
Beta Was this translation helpful? Give feedback.
-
Hi @RotaN8 The answer given by @EdamAme-x is correct. Bun is responsible for sending that message. Hono is only a router it does not handle the server being started or any lifecycles. To update the message you can use If you do this, you do not need an export default anymore, when Bun sees a file has an export default it tries to run it in a Bun serve automatically. |
Beta Was this translation helpful? Give feedback.
Hi @RotaN8
The answer given by @EdamAme-x is correct. Bun is responsible for sending that message. Hono is only a router it does not handle the server being started or any lifecycles.
To update the message you can use
Bun.serve(app)
and add a custom console log after it.If you do this, you do not need an export default anymore, when Bun sees a file has an export default it tries to run it in a Bun serve automatically.