From f90ceae617070fe62af4cd917db27074eaf04cd6 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 16 Feb 2025 08:10:53 -0700 Subject: [PATCH] update README dev commands & other commentary --- Dockerfile | 2 +- README.md | 6 ++---- src/server.ts | 2 +- src/vc/did-eth-local-resolver.ts | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8ffdbda..e951dcb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN apk add git RUN git clone https://gitea.anomalistdesign.com/log-trade/image-api.git WORKDIR image-api RUN git checkout $IMAGE_API_VERSION -# dev dependencies like TypeScript are needed to build +# dev dependencies like TypeScript are needed to build, so run it and then run the prod install later RUN pnpm install RUN pnpm build RUN pnpm install --prod diff --git a/README.md b/README.md index b729f75..f332517 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,5 @@ # Image Server -Remaining: -- dockerize - ## setup ``` @@ -23,7 +20,8 @@ AWS_REGION= ## dev ``` -node src/server.js +npm run build +npm start ``` ## test diff --git a/src/server.ts b/src/server.ts index 6a39781..b94ebdf 100644 --- a/src/server.ts +++ b/src/server.ts @@ -77,7 +77,7 @@ app.get('/image-limits', async (req, res) => { * - "image" file Blob * - "claimType" (optional, eg. "GiveAction", "PlanAction", "profile") * - "handleId" (optional) - * - "fileName" (optional, if you want to replace an previous image) + * - "fileName" (optional, if you want to replace a previous image) */ app.post('/image', uploadMulter.single('image'), async (req, res) => { const reqFile = req.file; diff --git a/src/vc/did-eth-local-resolver.ts b/src/vc/did-eth-local-resolver.ts index 93b52b3..ade91c8 100644 --- a/src/vc/did-eth-local-resolver.ts +++ b/src/vc/did-eth-local-resolver.ts @@ -9,7 +9,7 @@ import {DIDResolutionResult} from "did-resolver"; * @param did : string * @returns {Promise} * - * Similar code resides in endorser-ch + * Similar code resides in crowd-funder-for-time-pwa and endorser-ch */ export const didEthLocalResolver = async(did: string): Promise => { const didRegex = /^did:ethr:(0x[0-9a-fA-F]{40})$/;