𝗗𝗲𝗽𝗹𝗼𝘆𝗶𝗻𝗴 𝗮 𝗙𝘂𝗹𝗹-𝗦𝘁𝗮𝗰𝗸 𝗟𝗠𝗦 𝗼𝗻 𝗦𝗵𝗮𝗿𝗲𝗱 𝗛𝗼𝘀𝘁𝗶𝗻𝗴 𝗮𝗻𝗱 𝗥𝗲𝗻𝗱𝗲𝗿

We shipped a production Node.js, React, and PostgreSQL app without a VPS.

We built a full Learning Management System for G3HUB. The stack included: • Frontend: React 18, Vite, and TailwindCSS • Backend: Node.js 20 and Express 5 • Database: PostgreSQL 15 via Supabase • ORM: Drizzle ORM

We had no cloud VM or VPS. We only had a cPanel shared hosting account that already ran a WordPress site. Here is how we made it work.

𝗧𝗵𝗲 𝗜𝗻𝗳𝗿𝗮𝘀𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲 𝗦𝗽𝗹𝗶𝘁 We could not run Node.js and PostgreSQL on the same server. We split the app across three services: • Frontend: cPanel shared hosting (Static files) • API: Render (Free tier) • Database: Supabase (Free tier)

𝗧𝗵𝗲 𝗕𝗶𝗴𝗴𝗲𝘀𝘁 𝗛𝘂𝗿𝗱𝗹𝗲𝘀

𝟭. 𝗧𝗵𝗲 𝗗𝗮𝘁𝗮𝗯𝗮𝘀𝗲 𝗕𝗹𝗼𝗰𝗸𝗮𝗱𝗲 We tried running the Node.js API directly on cPanel. It failed immediately. Shared hosting providers often block outbound connections on port 5432. This means your app cannot talk to an external database. We moved the API to Render to solve this.

𝟮. 𝗧𝗵𝗲 𝗠𝗼𝗻𝗼𝗿𝗲𝗽𝗼 𝗣𝗮𝗶𝗻 Our codebase used pnpm workspaces. When we pushed to Render, the build failed because Render did not recognize our local workspace dependencies. The fix: We used esbuild to bundle everything into a single 6.4MB file. We replaced the complex package.json with a minimal version containing only external dependencies.

𝟯. 𝗧𝗵𝗲 𝗖𝗢𝗥𝗦 𝗮𝗻𝗱 𝗣𝗿𝗼𝘅𝘆 𝗪𝗮𝗿 We tried using Apache mod_proxy to route API calls from our domain to Render. It timed out. Shared hosting often restricts this module. The fix: We used a PHP cURL proxy. Since the frontend and the PHP script live on the same domain, we avoided all CORS issues. The PHP script silently forwards requests to Render.

𝗗𝗲𝗽𝗹𝗼𝘆𝗺𝗲𝗻𝘁 𝗧𝗶𝗽𝘀 • Build on PowerShell, not Git Bash. Windows handles environment variables differently in Git Bash. • Use a database password without special characters. Characters like @ or ! require URL encoding and cause connection errors. • Use UptimeRobot. Render free tier sleeps after 15 minutes. Set a ping to your health check endpoint to keep it awake.

𝗧𝗼𝘁𝗮𝗹 𝗜𝗻𝗳𝗿𝗮𝘀𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲 𝗖𝗼𝘀𝘁: $0/month.

If you have the budget, use a VPS. It removes these walls. But if you have zero budget, creative routing makes production-ready apps possible.

Source: https://dev.to/oyohedmond/deploying-a-full-stack-lms-on-shared-hosting-render-free-the-hard-way-4ke0