The Rise Yahudim app now has a backend API that you can deploy to Render.com.
- Stores quiz questions (accessible from all devices)
- Tracks the current active question for students
- Stores scripture lesson notes
- Synchronizes data across multiple browsers/devices
- Initialize git (if not already done):
cd /home/ishaglcy/public_html/yahudim.app
git init
git add .
git commit -m "Initial commit with API"- Push to GitHub:
# Create a repository on GitHub first, then:
git remote add origin https://github.com/YOUR_USERNAME/rise-yahudim.git
git branch -M main
git push -u origin main-
Go to https://render.com and sign up/login
-
Click "New +" and select "Web Service"
-
Connect your GitHub account and select your repository
-
Configure the service:
- Name: rise-yahudim-api
- Root Directory: api
- Environment: Node
- Build Command: npm install
- Start Command: npm start
- Plan: Free
-
Add environment variables:
NODE_ENV: productionCORS_ORIGIN: https://yahudim.app
-
Click "Create Web Service"
Once deployed, Render will give you a URL like:
https://rise-yahudim-api.onrender.com
Update the frontend to use your API. Create an .env file in the root:
VITE_API_URL=https://rise-yahudim-api.onrender.comThen rebuild and redeploy your frontend:
npm run build
./deploy.sh- Start the API:
cd api
npm run dev- Start the frontend (in another terminal):
npm run dev- The frontend will be at
http://localhost:5173 - The API will be at
http://localhost:3001
Test with curl:
# Health check
curl https://your-api-url.onrender.com/health
# Get all questions
curl https://your-api-url.onrender.com/api/quiz/questions
# Get all notes
curl https://your-api-url.onrender.com/api/notesRender.com's free tier has these limitations:
- Service sleeps after 15 minutes of inactivity
- First request after sleep takes 30-60 seconds (cold start)
- Storage is ephemeral (data lost on service restart)
For production use, consider:
-
Render Persistent Disk (Paid plan - $7/month)
- Adds persistent storage to your service
- Data survives restarts
-
External Database (Free options available)
- MongoDB Atlas (Free tier: 512MB)
- Supabase PostgreSQL (Free tier: 500MB)
- Update
database.jsto use the database
-
Upgrade to Paid Plan ($7/month)
- No sleep time
- Persistent disk included
- Better performance
- Check Render.com dashboard for errors
- View logs in Render dashboard
- Ensure environment variables are set correctly
- Make sure
CORS_ORIGINincludes your frontend URL - Check that the frontend is using the correct API URL
- This is expected on free tier
- Upgrade to paid plan or use external database
- For testing, data loss is acceptable
After deploying to Render:
- Test all API endpoints
- Update frontend with API URL
- Test quiz and notes features
- Consider upgrading for persistent storage if needed