Snelle productie health check — test alle admin + public endpoints op 500/404 errors. Gebruik bij "health check", "is alles live", "check productie", "werkt alles".
Productie health check via curl + Googlebot UA (bypass geo-block). Mode: $ARGUMENTS
# ALLE endpoints in 1 commando (default)
bash -c '
echo "=== Admin endpoints ==="
for ep in "dashboard" "upload-queue" "inventory" "discounts" "week-deals" "stock-history" "auto-cleanup" "health" "api-key" "bank-transactions" "printer-settings" "postnl-settings" "returns" "todos" "status"; do
code=$(curl -s -o /dev/null -w "%{http_code}" \
-A "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" \
-H "Authorization: Bearer gameshop-admin-2024" \
"https://gameshopenter.com/api/admin/${ep}?t=$(date +%s)")
[ "$code" = "200" ] && echo "✓ ${ep}" || echo "✗ ${ep}: ${code}"
done
echo ""
echo "=== Public pages ==="
for page in "/" "/shop" "/pokemon-games" "/switch-games" "/ds-games" "/3ds-games" "/blog" "/sealed" "/deals" "/contact" "/inkoop" "/over-ons" "/afrekenen" "/winkelwagen" "/premium" "/vitrine" "/faq" "/game-finder"; do
code=$(curl -s -o /dev/null -w "%{http_code}" -A "Googlebot" -L "https://gameshopenter.com${page}")
[ "$code" = "200" ] && echo "✓ ${page}" || echo "✗ ${page}: ${code}"
done
echo ""
echo "=== Feeds ==="
for feed in "sitemap.xml" "feed.xml" "google-shopping.xml" "rss.xml" "robots.txt"; do
code=$(curl -s -o /dev/null -w "%{http_code}" -A "Googlebot" "https://gameshopenter.com/${feed}")
[ "$code" = "200" ] && echo "✓ /${feed}" || echo "✗ /${feed}: ${code}"
done
'
gameshopenter.com heeft geo-blocking via middleware — alleen NL/BE bezoekers mogen de site zien, plus een allowlist voor crawlers (Googlebot, Bingbot, etc.). Vanuit Lenn's lokale terminal zit je in een geo-block. Googlebot UA staat in de allowlist en bypass dit.
} catch (error) {
const msg = error instanceof Error ? error.message : String(error);
const stack = error instanceof Error ? error.stack?.split('\n').slice(0, 3).join(' | ') : '';
console.error('[endpoint] Error:', msg, stack);
return NextResponse.json({
error: 'Serverfout',
detail: msg.slice(0, 200),
where: stack?.slice(0, 200),
}, { status: 500 });
}
detail en where in response bodysrc/app/<path>/page.tsxnext.config.js/vitrine → /premium (Lenn's team noemt het Vitrine maar URL is /premium)Authorization: Bearer gameshop-admin-2024checkAuth() in route.ts voor de juiste patternDeze zijn GEEN errors — ze verwachten specifieke input:
POST-only endpoints geven 405 op GET: print-status, orders/storetrack endpoint geeft 400 zonder orderNumberemails/fetch geeft 401 met Bearer token — andere auth patternorders zelf bestaat niet (subroutes zoals orders/list wel)curl -s -w "
DNS: %{time_namelookup}s
Connect: %{time_connect}s
TTFB: %{time_starttransfer}s
Total: %{time_total}s
Size: %{size_download}B
" -o /dev/null "https://gameshopenter.com/"
Gezonde baselines: