Server-Side Comment Count
This page is server-side rendered and fetches the comment count during the build/request.
Result
Article ID: 1234567
Brand: tel
Environment: production
Comment Count: N/A
Usage Example
// Server Component (Next.js App Router)
import { getCommentCount } from '@news-components/comments-web-sdk/server';
export default async function Page() {
const count = await getCommentCount(
'2152062', // articleId
'tel', // brand
'devtest' // environment (optional, defaults to 'production')
);
return <div>Comment count: {count}</div>;
}Try Different Parameters
You can test with different values using URL parameters:
Available Brands
gva, nb, tel, az, co, lt, lw, vlAvailable Environments
devtest, test, staging, production