From b7ffda64fdad572457d1b1eea54bc58ac3336cb6 Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Wed, 28 Aug 2024 11:13:41 +0100 Subject: [PATCH] Create a place to start a migration to Effect Refs #1834 --- package-lock.json | 12 ++++++++++++ package.json | 1 + src/index.ts | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 89e3bd8d8..3c1d507ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "crossref-ts": "^0.1.5", "datacite-ts": "^0.1.4", "doi-ts": "^0.1.9", + "effect": "^3.6.7", "express": "^4.19.2", "express-async-handler": "^1.2.0", "fetch-fp-ts": "^0.1.6", @@ -11959,6 +11960,12 @@ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, + "node_modules/effect": { + "version": "3.6.7", + "resolved": "https://registry.npmjs.org/effect/-/effect-3.6.7.tgz", + "integrity": "sha512-txHuQLxiwOHw6SZfZeWVH6PySULva3dsaaA+BgrE61wj06nTe50rh471FYLPqBYKSE0y/JaOuC2FSDfsIo0Kww==", + "license": "MIT" + }, "node_modules/ejs": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", @@ -34443,6 +34450,11 @@ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, + "effect": { + "version": "3.6.7", + "resolved": "https://registry.npmjs.org/effect/-/effect-3.6.7.tgz", + "integrity": "sha512-txHuQLxiwOHw6SZfZeWVH6PySULva3dsaaA+BgrE61wj06nTe50rh471FYLPqBYKSE0y/JaOuC2FSDfsIo0Kww==" + }, "ejs": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", diff --git a/package.json b/package.json index 7c6201723..95228e4f9 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "crossref-ts": "^0.1.5", "datacite-ts": "^0.1.4", "doi-ts": "^0.1.9", + "effect": "^3.6.7", "express": "^4.19.2", "express-async-handler": "^1.2.0", "fetch-fp-ts": "^0.1.6", diff --git a/src/index.ts b/src/index.ts index ad3039ccf..3e9ed0203 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,7 @@ import { createTerminus } from '@godaddy/terminus' import KeyvRedis from '@keyv/redis' import { SystemClock } from 'clock-ts' import * as dns from 'dns' +import { Effect } from 'effect' import * as C from 'fp-ts/lib/Console.js' import * as E from 'fp-ts/lib/Either.js' import * as RT from 'fp-ts/lib/ReaderTask.js' @@ -150,4 +151,4 @@ createTerminus(server, { signals: ['SIGINT', 'SIGTERM'], }) -server.listen(3000) +Effect.runFork(Effect.sync(() => server.listen(3000)))