Wire API services to PostGIS in docker-compose, broaden CORS handling for cross-origin clients, and align developer docs with the production momswap URL. Made-with: Cursor
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
This document explains how frontend developers should integrate with the backend through the reusable TypeScript client at `libs/geo-api-client`.
|
||||
|
||||
Primary backend URL for integration:
|
||||
|
||||
- `https://momswap.produktor.duckdns.org/`
|
||||
|
||||
## Goals
|
||||
|
||||
- Keep cryptographic signing logic in one place.
|
||||
@@ -68,7 +72,7 @@ const storageLike = {
|
||||
removeItem: (key: string) => storage.removeItem(key),
|
||||
};
|
||||
|
||||
const client = new GeoApiClient("http://localhost:8080", storageLike);
|
||||
const client = new GeoApiClient("https://momswap.produktor.duckdns.org", storageLike);
|
||||
|
||||
const keys = await client.ensureKeysInStorage();
|
||||
await client.loginWithSignature(keys.publicKey, keys.privateKey);
|
||||
@@ -97,3 +101,5 @@ For no-bundler apps, import the built ESM file:
|
||||
```
|
||||
|
||||
The backend itself serves static UI at `/web/`, but this library can be consumed by any frontend runtime that supports `fetch`, `TextEncoder`, and ES modules.
|
||||
|
||||
For local development you can switch the client base URL to `http://localhost:8080`.
|
||||
|
||||
Reference in New Issue
Block a user