Skip to main content
Glama

Dad Joke Visualizer

by rudedoggg
VERCEL_DEPLOYMENT_GUIDE.md•3.38 kB
# šŸš€ Vercel Deployment Guide for Dad Joke Visualizer ## āœ… Prerequisites 1. **GitHub Repository**: Your code must be pushed to GitHub 2. **Vercel Account**: Sign up at [vercel.com](https://vercel.com) 3. **Environment Variables**: Set up your `.env` variables in Vercel ## šŸ”§ Setup Steps ### 1. Connect Repository to Vercel 1. Go to [vercel.com/dashboard](https://vercel.com/dashboard) 2. Click **"Add New..."** → **"Project"** 3. **Import** your `DadJokeVisualizer` repository 4. Vercel will automatically detect the configuration ### 2. Configure Build Settings **Framework Preset**: `Other` (or leave blank) **Build Command**: ```bash npm run build ``` **Output Directory**: ``` dist ``` **Root Directory**: ``` . ``` ### 3. Set Environment Variables In Vercel dashboard, go to **Settings** → **Environment Variables** and add: ``` NANOBANANA_API_KEY=your_api_key_here NANOBANANA_BASE_URL=https://api.nanobanana.com PORT=3000 WEB_BASE_URL=https://your-app-name.vercel.app MCP_SERVER_NAME=dad-joke-visualizer MCP_SERVER_VERSION=1.0.0 NODE_ENV=production ``` ### 4. Enable Automatic Deployments āœ… **Automatic deployments are enabled by default!** Every time you push to your `main` branch, Vercel will: - Trigger a new build - Deploy the latest version - Update your live site ## šŸŽÆ How It Works ### Updated File Structure ``` DadJokeVisualizer/ ā”œā”€ā”€ api/ │ └── index.js # šŸ“‹ Vercel API handler ā”œā”€ā”€ vercel.json # āš™ļø Vercel configuration ā”œā”€ā”€ dist/ # šŸ—ļø Compiled TypeScript ā”œā”€ā”€ web/ # 🌐 Static web files └── src/ # šŸ“ Source TypeScript ``` ### Deployment Flow 1. **Push to GitHub** → `git push origin main` 2. **Vercel detects changes** → Starts build process 3. **Build runs** → `npm run build` (compiles TypeScript + copies web files) 4. **Deploy** → Creates serverless functions 5. **Live!** → Your app is accessible at `https://your-project.vercel.app` ## šŸ”„ Continuous Deployment ### Triggering Deployments **Automatic** (recommended): - Push to `main` branch → Auto-deployment **Manual**: - Go to Vercel dashboard - Click **"Deploy"** button **Preview Deployments**: - Push to any branch → Creates preview URL - Perfect for testing before merging to main ## šŸ› ļø Troubleshooting ### Build Fails 1. Check **Functions** tab in Vercel for errors 2. Verify `buildCommand` in `vercel.json` 3. Check all dependencies are in `package.json` ### Environment Variables 1. Go to **Settings** → **Environment Variables** 2. Ensure all variables are set for **Production** environment 3. Redeploy after adding variables ### Domain Issues - Default: `your-project-name.vercel.app` - Custom domains available: **Settings** → **Domains** ## šŸŽ‰ Success Indicators āœ… **Working deployment shows**: - Clean build logs - Functions deployed successfully - Accessible URL in Vercel dashboard - Web interface loads properly ## šŸ“‹ Next Steps After Deployment 1. **Test the web interface** at your Vercel URL 2. **Verify image generation** (will use SVG fallback due to Nano-banana SSL issues) 3. **Share your Dad Joke Visualizer** with friends! 4. **Monitor deployments** in Vercel dashboard --- šŸŽ­ **Your Dad Joke Visualizer should now automatically deploy whenever you push to GitHub!** šŸŽ­

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rudedoggg/DadJokeVisualizer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server