Marketplace móvil para negocios locales mexicanos. Estructura inicial: - apps/backend (NestJS API) - apps/frontend (React Web) - apps/mobile (Expo/React Native) - apps/mcp-server (Claude MCP Server) - apps/whatsapp-service (WhatsApp Business API) - database/ (PostgreSQL DDL) - docs/ (Documentación) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
20 lines
432 B
JavaScript
20 lines
432 B
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true,
|
|
});
|
|
exports.default = getBaseUrlFromRequest;
|
|
function getBaseUrlFromRequest(req) {
|
|
const hostHeader = req.headers.host;
|
|
if (hostHeader == null) {
|
|
return null;
|
|
}
|
|
const scheme = req.socket.encrypted === true ? "https" : "http";
|
|
const url = `${scheme}://${req.headers.host}`;
|
|
try {
|
|
return new URL(url);
|
|
} catch {
|
|
return null;
|
|
}
|
|
}
|