Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18.x', '20.x']
node-version: ['18.18.x', '20.x']
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# deAPI Tester

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Node.js 18+](https://img.shields.io/badge/Node.js-18%2B-green.svg)](https://nodejs.org/)
[![Node.js 18.18.0+](https://img.shields.io/badge/Node.js-18.18.0%2B-green.svg)](https://nodejs.org/)
[![Next.js 15](https://img.shields.io/badge/Next.js-15-black.svg)](https://nextjs.org/)
[![Docker](https://img.shields.io/badge/Docker-ready-blue.svg)](https://www.docker.com/)

Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"url": "https://deapi.ai"
},
"license": "MIT",
"engines": {
"node": ">=18.18.0"
},
"repository": {
"type": "git",
"url": "https://github.com/deapi-ai/deapi-tester.git"
Expand Down
20 changes: 16 additions & 4 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,23 @@ import type { Metadata } from 'next';
import './globals.css';
import { Providers } from '@/components/Providers';

function getMetadataBaseUrl(): string {
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL;
if (!siteUrl) {
return 'http://localhost:3000';
}
// Ensure URL has a protocol
if (!/^https?:\/\//i.test(siteUrl)) {
console.warn(
`NEXT_PUBLIC_SITE_URL ('${siteUrl}') missing protocol. Using default: http://localhost:3000`
);
return 'http://localhost:3000';
}
return siteUrl;
}

export const metadata: Metadata = {
metadataBase: new URL(
process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000'
),
metadataBase: new URL(getMetadataBaseUrl()),
title: 'deAPI Tester — Test AI Inference Endpoints',
description:
'Local developer tool for testing deAPI.ai endpoints. Generate images, videos, audio and more with dynamic forms, async job tracking, and result preview.',
Expand All @@ -24,7 +37,6 @@ export const metadata: Metadata = {
description:
'Test deAPI.ai endpoints locally with dynamic forms, async job tracking, price calculator and result preview.',
type: 'website',
url: 'https://github.com/deapi-ai/deapi-tester',
siteName: 'deAPI Tester',
images: ['/og-image.png'],
},
Expand Down