// effect-http api
const AppLayer = Layer.mergeAll(
Service1.Live,
Service2.Live,
Service3.Live
);
const app = RouterBuilder.make(api).pipe(
// Add all the routes
);
app.pipe(
Effect.tap(Effect.logInfo(`Visit: http://localhost:1337/docs#/`)),
NodeServer.listen({ port: 1337 }),
Effect.provide(AppLayer),
NodeRuntime.runMain,
);
// effect-http api
const AppLayer = Layer.mergeAll(
Service1.Live,
Service2.Live,
Service3.Live
);
const app = RouterBuilder.make(api).pipe(
// Add all the routes
);
app.pipe(
Effect.tap(Effect.logInfo(`Visit: http://localhost:1337/docs#/`)),
NodeServer.listen({ port: 1337 }),
Effect.provide(AppLayer),
NodeRuntime.runMain,
);