A beautiful, responsive gender reveal website where friends can vote on whether they think it's a boy or girl, and suggest names!
- 💙💗 Cute Pink & Blue Theme - Beautiful gradient design with animations
- 📱 Mobile Responsive - Works perfectly on all devices
- 🗳️ Voting System - Friends can cast their vote for Boy or Girl
- 📝 Name Suggestions - Collect multiple name suggestions from each guest
- 📊 Live Results - See voting results with animated progress bars
- 💾 Persistent Storage - All votes saved to a JSON file database
-
Start the server:
node server.js
-
Open in browser:
http://localhost:3000
That's it! No dependencies to install - uses only Node.js built-in modules.
- Install Heroku CLI and login
- Create a new Heroku app:
heroku create your-gender-reveal
- Deploy:
git init git add . git commit -m "Initial commit" git push heroku main
- Go to railway.app
- Click "New Project" → "Deploy from GitHub repo"
- Select this repository
- Railway will auto-detect and deploy!
- Go to render.com
- Click "New +" → "Web Service"
- Connect your GitHub repository
- Set:
- Build Command: (leave empty)
- Start Command:
node server.js
- Click "Create Web Service"
- Go to DigitalOcean Apps
- Click "Create App"
- Connect your GitHub repository
- Configure:
- Run Command:
node server.js - HTTP Port: 3000
- Run Command:
- Deploy!
# Install Node.js on your server
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
# Clone/upload your code
cd /var/www/gender-reveal
# Start with PM2 (process manager)
npm install -g pm2
pm2 start server.js --name gender-reveal
pm2 save
pm2 startupgender-reveal/
├── server.js # Node.js HTTP server with API
├── votes.json # Database file (auto-created)
├── package.json # Project configuration
├── README.md # This file
└── public/
├── index.html # Main page
├── style.css # Pink/Blue styling
└── script.js # Interactive functionality
Edit server.js and modify:
const PORT = process.env.PORT || 3000; // Change 3000 to your portThe votes are stored in votes.json in the project root. This file is automatically created when the first vote is submitted.
Each vote is stored with:
- Guest name
- Vote (boy/girl)
- Name suggestions (array)
- Timestamp
Example:
{
"votes": [
{
"id": 1234567890,
"guestName": "Sarah",
"vote": "girl",
"nameSuggestions": ["Emma", "Olivia"],
"timestamp": "2025-11-18T23:25:00.000Z"
}
]
}Edit public/style.css and modify the CSS variables:
:root {
--boy-blue: #4A90E2;
--girl-pink: #FF69B4;
/* ... */
}The site uses Google Fonts (Fredoka & Nunito). Change them in public/index.html:
<link href="https://fonts.googleapis.com/css2?family=YourFont&display=swap" rel="stylesheet">Port already in use:
# Find and kill the process
lsof -ti:3000 | xargs kill -9Can't access from other devices:
- Make sure your firewall allows port 3000
- Use your local IP address (e.g.,
http://192.168.1.100:3000)
MIT - Feel free to use for your gender reveal party!
Made with 💙 and 💗