decentralised sync engine

Compare changes

Choose any two refs to compare.

Changed files
+14 -4
.github
workflows
src
+7
.github/workflows/push-image.yaml
···
+
name: Build and Push Docker Image
+
+
on:
+
push:
+
tags:
+
- "v*"
+
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
+1 -1
Dockerfile
···
COPY --from=builder /app/dist ./dist
-
EXPOSE 7337
+
EXPOSE 7338
CMD ["node", "dist/index.mjs"]
+1 -1
src/index.ts
···
}
}
-
server.listen({ port: SERVER_PORT }).catch((err: unknown) => {
+
server.listen({ port: SERVER_PORT, host: "::" }).catch((err: unknown) => {
server.log.error(err);
process.exit(1);
});
+4 -1
src/lib/utils/handshake.ts
···
error: httpResponseParseError,
data: handshakeResponseDataParsed,
} = httpSuccessResponseSchema.safeParse(handshakeResponseData);
-
if (!httpResponseParseSuccess)
+
if (!httpResponseParseSuccess) {
+
console.error("Parsing response failed.", httpResponseParseError);
+
console.error("Incoming data:", JSON.stringify(handshakeResponseData));
return {
ok: false,
error: z.treeifyError(httpResponseParseError),
};
+
}
const { data: handshakeData } = handshakeResponseDataParsed;
+1 -1
src/lib/env.ts
···
"Environment variable SERVICE_DID not set. Defaulting to `did:web:localhost`",
);
}
-
export const SERVICE_DID = serviceDidParsed ?? "did:web:localhost";
+
export const SERVICE_DID = serviceDidParsed ?? `did:web:localhost%3A${SERVER_PORT.toString()}`;
const constellationUrl = process.env.CONSTELLATION_URL;
let constellationUrlParsed: URL | undefined;