update README dev commands & other commentary

This commit is contained in:
2025-02-16 08:10:53 -07:00
parent bb83982bc7
commit f90ceae617
4 changed files with 5 additions and 7 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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;

View File

@@ -9,7 +9,7 @@ import {DIDResolutionResult} from "did-resolver";
* @param did : string
* @returns {Promise<DIDResolutionResult>}
*
* 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<DIDResolutionResult> => {
const didRegex = /^did:ethr:(0x[0-9a-fA-F]{40})$/;