fix betting app vercel
This commit is contained in:
parent
537f7a9885
commit
9d5ca7cdf4
|
|
@ -2,6 +2,13 @@
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
swcMinify: true,
|
swcMinify: true,
|
||||||
|
// Environment variables that should be available on the client side
|
||||||
|
env: {
|
||||||
|
NEXT_PUBLIC_PUSHER_APP_KEY: process.env.NEXT_PUBLIC_PUSHER_APP_KEY,
|
||||||
|
NEXT_PUBLIC_PUSHER_CLUSTER: process.env.NEXT_PUBLIC_PUSHER_CLUSTER,
|
||||||
|
NEXT_PUBLIC_SUPABASE_URL: process.env.NEXT_PUBLIC_SUPABASE_URL,
|
||||||
|
NEXT_PUBLIC_SUPABASE_ANON_KEY: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = nextConfig
|
module.exports = nextConfig
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
import { db } from '../../lib/supabase'
|
|
||||||
|
|
||||||
export default async function handler(req, res) {
|
|
||||||
try {
|
|
||||||
// Test database connection
|
|
||||||
const users = await db.getUsers()
|
|
||||||
|
|
||||||
res.status(200).json({
|
|
||||||
status: 'healthy',
|
|
||||||
database: 'connected',
|
|
||||||
usersCount: Object.keys(users).length,
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
environment: {
|
|
||||||
hasSupabaseUrl: !!process.env.NEXT_PUBLIC_SUPABASE_URL,
|
|
||||||
hasSupabaseKey: !!process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
|
|
||||||
hasPusherKey: !!process.env.NEXT_PUBLIC_PUSHER_APP_KEY,
|
|
||||||
hasPusherCluster: !!process.env.NEXT_PUBLIC_PUSHER_CLUSTER
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Health check error:', error)
|
|
||||||
res.status(500).json({
|
|
||||||
status: 'unhealthy',
|
|
||||||
error: error.message,
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
environment: {
|
|
||||||
hasSupabaseUrl: !!process.env.NEXT_PUBLIC_SUPABASE_URL,
|
|
||||||
hasSupabaseKey: !!process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY,
|
|
||||||
hasPusherKey: !!process.env.NEXT_PUBLIC_PUSHER_APP_KEY,
|
|
||||||
hasPusherCluster: !!process.env.NEXT_PUBLIC_PUSHER_CLUSTER
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
export default function handler(req, res) {
|
|
||||||
res.status(200).json({
|
|
||||||
message: 'API is working!',
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
method: req.method,
|
|
||||||
url: req.url
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
@ -17,10 +17,14 @@ const ChessApp = dynamic(() => import('../components/ChessApp'), {
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
<div style={{ padding: '20px', fontFamily: 'Arial, sans-serif' }}>
|
<>
|
||||||
<h1>Hello World!</h1>
|
<Head>
|
||||||
<p>If you can see this, Next.js routing is working.</p>
|
<title>Commons Hub Chess Tournament</title>
|
||||||
<p>Current time: {new Date().toISOString()}</p>
|
<meta name="description" content="Official Mycelial-Betting Network for Chess Tournaments" />
|
||||||
</div>
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
</Head>
|
||||||
|
<ChessApp />
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
export default function TestPage() {
|
|
||||||
return (
|
|
||||||
<div style={{ padding: '20px', fontFamily: 'Arial, sans-serif' }}>
|
|
||||||
<h1>Test Page Working!</h1>
|
|
||||||
<p>If you can see this, basic routing is working.</p>
|
|
||||||
<p>Current time: {new Date().toISOString()}</p>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue