@@ -18,17 +18,19 @@ const serverListeningMessage = Match.type<AddressInfo | string | null>().pipe(
|
||||
Match.orElse(v => `HTTP server listening on ${ v.address }:${ v.port }`),
|
||||
)
|
||||
|
||||
export const ExpressNodeHTTPServerLive = (config: {
|
||||
readonly backlog?: Config.Config<number | undefined>
|
||||
readonly exclusive?: Config.Config<boolean | undefined>
|
||||
readonly host?: Config.Config<string | undefined>
|
||||
readonly ipv6Only?: Config.Config<boolean | undefined>
|
||||
readonly path?: Config.Config<string | undefined>
|
||||
readonly port?: Config.Config<number | undefined>
|
||||
readonly readableAll?: Config.Config<boolean | undefined>
|
||||
readonly signal?: AbortSignal
|
||||
readonly writableAll?: Config.Config<boolean | undefined>
|
||||
}) => Layer.effect(ExpressNodeHTTPServer, Effect.acquireRelease(
|
||||
export const ExpressNodeHTTPServerLive = (
|
||||
config: {
|
||||
readonly backlog?: Config.Config<number | undefined>
|
||||
readonly exclusive?: Config.Config<boolean | undefined>
|
||||
readonly host?: Config.Config<string | undefined>
|
||||
readonly ipv6Only?: Config.Config<boolean | undefined>
|
||||
readonly path?: Config.Config<string | undefined>
|
||||
readonly port?: Config.Config<number | undefined>
|
||||
readonly readableAll?: Config.Config<boolean | undefined>
|
||||
readonly signal?: AbortSignal
|
||||
readonly writableAll?: Config.Config<boolean | undefined>
|
||||
} = {}
|
||||
) => Layer.effect(ExpressNodeHTTPServer, Effect.acquireRelease(
|
||||
Effect.gen(function*() {
|
||||
const app = yield* ExpressApp
|
||||
const http = yield* importNodeHTTP
|
||||
|
||||
Reference in New Issue
Block a user