Effect CommunityEC
Effect Community2mo ago
2 replies
Kam

Difference Between Using `ManagedRuntime` and `Effect.provide`

Is there a difference between
const EnvLive = Layer.merge(DatabaseLayer, Logger.pretty);
export const appRuntime = ManagedRuntime.make(EnvLive);

...
pipe(
  program,
  appRuntime.runFork,
);


and

const EnvLive = Layer.merge(DatabaseLayer, Logger.pretty);

...
pipe(
  program,
  Effect.provide(EnvLive),
  Effect.runFork,
);


Or are they mostly equivalent?
Was this page helpful?