What’s the Cheapest Way to Host a Small TypeScript/MySQL Monorepo?
Asked by
paint.dry.yet
I'm building a personal application and want to make it publicly accessible so four or five friends can test it. I'm mainly looking for the lowest-cost setup.
The project uses Turborepo with a monorepo structure:
- An API backed by MySQL
- A React/TypeScript frontend
- Several packages and scripts for cron jobs and fetching third-party data
- Docker containers
I looked at Vercel, but I wasn't sure how well it supports this setup. I also explored AWS, but I reached a step that appeared to require buying a domain. What hosting approach would you recommend for a small test deployment, and do I even need to purchase a domain?
Answers
A platform-as-a-service provider such as Render can be easier than managing a VPS. You can deploy the frontend and API from the monorepo and connect a hosted database, although the free or lowest-cost tiers may sleep, have resource limits, or charge separately for the database. For a short-lived demo, that convenience may be worth more than running everything yourself.
Reply to this answer
A small VPS is probably the simplest reliable solution. Providers such as DigitalOcean, Linode, or Vultr offer inexpensive entry-level servers where you can run Docker Compose, MySQL, the API, the frontend, and scheduled jobs together. You can deploy the monorepo as containers and use a reverse proxy for routing.
Reply to this answer
You don’t generally need to buy a domain to deploy on AWS or other hosting platforms. Most services provide a temporary public hostname or IP address. A domain is only necessary if you want a custom, memorable address. For a small project, a basic virtual machine or container service is enough; avoid adding managed services you don’t need because they can increase the cost.
paint.dry.yet: I think I followed a setup path that assumed I wanted a custom domain. I’ll check the simpler virtual machine options.
Reply to this answer
For a temporary project with only a few users, you may not need paid hosting at all. Run the Docker containers on your own computer and expose the application through a free Cloudflare Tunnel or a similar tunneling service. You’ll need to keep your machine running, and you should secure the database and application properly, but this can be the cheapest option.
paint.dry.yet: That sounds useful for testing. I’ll look into using a tunnel instead of exposing my home network directly.
Reply to this answer
Add your answer
Answers are reviewed before publication.
cobweb clearing: Turborepo also has support for creating optimized Docker builds, which can help keep the deployment smaller and faster.