openvibers/openvibe.host Commits

Host's home: the cheapest servers, not archive storage at $0.00 (#236)

OP OpenVibers committed 12 days ago · ebb833f0c8 · 2 files, +7 −4

The aside took the cheapest plans of any kind, so per-GB archive storage ($0.00 a GB once rounded) filled it with four
Azure Archive rows. It now lists servers only (a plan with vCPU and a price above zero), titled "Cheapest servers
right now".

Changes

ddiff --git a/server/render/catalog.js b/server/render/catalog.js
iindex e4ad370..06cbd40 100644
---- a/server/render/catalog.js
++++ b/server/render/catalog.js
@@@ -421,9 +421,12 @@ function front({ plans, providers, promos: live, stats, offers: recent = [], dom
const move = c.percent == null ? (up ? 'Rose' : 'Dropped') : `${up ? 'Rose' : 'Dropped'} ${Math.abs(c.percent)}%`;
return `<li><a href="${esc(c.href)}"><span class="hc-change-what"><b>${esc(c.name)}</b><span class="hc-dim">${esc(c.kind)}</span></span><span class="hc-change-move ${up ? 'is-up' : 'is-down'}"><span class="hc-change-word">${move}</span><span class="hc-change-prices">${esc(money(c.before, c.currency) || String(c.before))} → ${esc(money(c.after, c.currency) || String(c.after))}</span></span></a></li>`;
}).join('')}</ol></section>` : '';
-- const aside = plans.length ? `<div class="hc-aside" aria-label="Lowest prices right now">
--<p class="hc-aside-h">Lowest monthly prices right now</p>
--<ol>${plans.slice(0, 5).map((p) => `<li>${link(`/catalog/plans/${encodeURIComponent(p.id)}`, `<span>${esc(p.provider_name)} <b>${esc(p.name)}</b></span><span class="hc-aside-spec">${[p.vcpu != null ? `${num(p.vcpu)} vCPU` : null, bytesMb(p.ram_mb)].filter(Boolean).map(esc).join(' · ')}</span><strong>${esc(money(p.price_monthly, p.currency))}</strong>`)}</li>`).join('')}</ol>
++ // The aside is servers: a plan with vCPU and a price above zero. Per-GB storage (archive tiers at $0.00 a GB once
++ // rounded) read as four free "plans" at the top of the home (2026-11-01).
++ const servers = plans.filter((p) => p.vcpu != null && Number(p.price_monthly) > 0);
++ const aside = servers.length ? `<div class="hc-aside" aria-label="Lowest prices right now">
++<p class="hc-aside-h">Cheapest servers right now</p>
++<ol>${servers.slice(0, 5).map((p) => `<li>${link(`/catalog/plans/${encodeURIComponent(p.id)}`, `<span>${esc(p.provider_name)} <b>${esc(p.name)}</b></span><span class="hc-aside-spec">${[p.vcpu != null ? `${num(p.vcpu)} vCPU` : null, bytesMb(p.ram_mb)].filter(Boolean).map(esc).join(' · ')}</span><strong>${esc(money(p.price_monthly, p.currency))}</strong>`)}</li>`).join('')}</ol>
<p class="hc-aside-foot">Checked ${esc(day(stats.lastChecked) || '')} · ${link('/catalog', 'compare all')}</p>
</div>` : '';
return showcase.hero({
ddiff --git a/test/catalog-public.test.js b/test/catalog-public.test.js
iindex 6acd28c..f37890b 100644
---- a/test/catalog-public.test.js
++++ b/test/catalog-public.test.js
@@@ -40,7 +40,7 @@ const { boot, check, done } = require('./helpers/boot');
const plans = await t.api('GET', '/catalog'); assert.match(plans.text, /<form class="hc-filters" method="get" action="\/catalog"/); assert.match(plans.text, /<table class="hc-table">/);
assert.match(plans.text, /How the comparison works/); assert.doesNotMatch(plans.text, /<script[^>]*src="[^"]*catalog/, 'the catalog needs no script of its own');
const front = await t.api('GET', '/'); assert.strictEqual(front.status, 200);
-- assert.match(front.text, /Lowest monthly prices right now/); assert.match(front.text, /\$4\.00/, 'the cheapest plan is on the front page');
++ assert.match(front.text, /Cheapest servers right now/); assert.match(front.text, /\$4\.00/, 'the cheapest plan is on the front page');
assert.match(front.text, /css\/catalog\.css\?v=/);
for (const h of ['The lowest monthly prices', 'The lowest price for each size', 'The most for your money', 'Providers compared', 'Questions people ask']) assert.ok(front.text.includes(h), `the front page has "${h}"`);
assert.match(front.text, /<title>Hosting plans and domain prices, compared · OpenVibe\.Host<\/title>/);