+server.js 475 Bytes
const API_BASE = 'http://136.112.29.74/api/ubigeo/clasificador';

export async function GET() {
  try {
    const response = await fetch(API_BASE);
    const data = await response.json();
    return new Response(JSON.stringify(data), {
      headers: { 'Content-Type': 'application/json' }
    });
  } catch (err) {
    return new Response(JSON.stringify({ error: 'Failed to fetch' }), {
      status: 500,
      headers: { 'Content-Type': 'application/json' }
    });
  }
}