mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 15:39:40 +02:00
Two production follow-ups surfaced after the deploy: 1. Pelias API was emitting continuous `ENOTFOUND placeholder`, `pip`, `interpolation` errors because we declared those services in pelias.json but never actually run them (we don't need WOF admin lookup or street interpolation for the DACH use case). Removed the stale entries — Pelias degrades cleanly to libpostal-only parsing, which is what we want. 2. Bun.serve's default idleTimeout is 10s, which is too tight for cold Pelias queries hitting Elasticsearch. Raise to 60s so first-query-after-idle doesn't get cut off. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
24 lines
778 B
TypeScript
24 lines
778 B
TypeScript
/**
|
|
* mana-geocoding — Self-hosted geocoding proxy.
|
|
*
|
|
* Wraps a local Pelias instance with caching and OSM → PlaceCategory
|
|
* mapping. All geocoding queries stay within our infrastructure —
|
|
* no user location data leaves the network.
|
|
*/
|
|
|
|
import { createApp } from './app';
|
|
import { loadConfig } from './config';
|
|
|
|
const config = loadConfig();
|
|
|
|
console.log(`mana-geocoding starting on port ${config.port}...`);
|
|
console.log(`Pelias API: ${config.pelias.apiUrl}`);
|
|
|
|
export default {
|
|
port: config.port,
|
|
// Bun's default idleTimeout is 10s — too tight for Pelias cold queries
|
|
// that need to hit Elasticsearch and libpostal. 60s is generous enough
|
|
// for the worst-case while still cutting off stuck connections.
|
|
idleTimeout: 60,
|
|
fetch: createApp(config).fetch,
|
|
};
|