Skip to content
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

Bun: full-stack dev server with static options is not working #4448

Open
foreleven opened this issue Feb 13, 2025 · 0 comments
Open

Bun: full-stack dev server with static options is not working #4448

foreleven opened this issue Feb 13, 2025 · 0 comments
Labels
bug Something isn't working platform

Comments

@foreleven
Copy link

foreleven commented Feb 13, 2025

What version of Effect is running?

"@effect/platform": "^0.76.0"
"@effect/platform-bun": "^0.56.0"

What steps can reproduce the bug?

The full-stack dev server in Bun is not functioning correctly when using the static option in BunHttpServer.layer.

const ServerLive = BunHttpServer.layer({
  static: {
    "/": homepage,
  },
  development: true,
});

const HttpLive = HttpRouter.empty.pipe(
  HttpServer.serve(HttpMiddleware.logger),
  HttpServer.withLogAddress,
  Layer.provide(ServerLive)
);

BunRuntime.runMain(Layer.launch(HttpLive));

What is the expected behavior?

Serve the homepage HTML when accessing http://localhost:3000/

What do you see instead?

Got 404.

Additional information

No response

@foreleven foreleven added the bug Something isn't working label Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform
Projects
None yet
Development

No branches or pull requests

2 participants