Trouble Passing Config Variable to NodeServer in Effect Pipe

trying to use Config in a pipe, and can't seem to make it work properly. I keep getting an erro that my service is not found, which tells me i'm doing something wrong with my config (or effect composition)

app.pipe(
  Effect.provide(Layers),
  Effect.provide(mockRequest),
  Effect.provideService(UserInfo, userInfoMock),
  Effect.provideService(CookieService, cookieServiceTest),
  Effect.flatMap((self) =>
    Config.number('PORT').pipe(
      Config.withDefault(9444),
      Effect.flatMap((port) => NodeServer.listen({ port })(self)),
    ),
  ),
  NodeRuntime.runMain,
);


just want to make it so i can pass a config variablet o NodeServer
Was this page helpful?