Config refactoring

This commit is contained in:
Julien Valverdé
2024-07-15 05:01:24 +02:00
parent 000c5bda35
commit f4eeb66459
6 changed files with 50 additions and 27 deletions

View File

@@ -1,6 +1,6 @@
import { Context, Effect, Layer, Runtime } from "effect"
import { Server } from "node:http"
import { httpPort } from "../config"
import { ServerConfig } from "../ServerConfig"
import { ExpressApp } from "./ExpressApp"
@@ -14,7 +14,7 @@ export module ExpressHTTPServer {
)
const app = yield* ExpressApp
const port = yield* httpPort
const port = yield* ServerConfig.httpPort
return app.listen(port, () => runSync(Effect.logInfo(`HTTP server listening on ${ port }`)))
}),