In modern software development, it’s common to need a live backend environment long before a product is ready for production. Frontend developers need APIs to connect to, QA engineers need environments to test against, and clients often need early demos.
However, not every project starts with a hosting budget or production ready infrastructure in place. That’s where Render and TiDB Cloud come in, a powerful, cost-free combination that allows you to deploy a full Node.js backend with a MySQL-compatible database in just a few minutes.
This guide walks you through the complete process of deploying your Node.js + Express + TypeScript + Sequelize backend on Render, using TiDB Cloud as your serverless MySQL database both on their free tiers.
Why Render + TiDB Cloud?
Before diving into the setup, let’s explore why this combo is ideal for modern developers, especially in the early stages of development:
Free and easy setup: Both services provide generous free tiers with minimal configuration.
Serverless database:TiDB Cloud eliminates the hassle of managing database servers while staying fully MySQL-compatible.
Continuous deployment: Render automatically rebuilds and redeploys your app whenever you push to your GitHub repository.
SSL support out of the box: Secure connections are enabled by default, keeping your app compliant with best practices.
If you’re looking for a lightweight, zero-cost way to make your backend accessible online for testing or prototyping, this setup is perfect.
Tech Stack Overview
Here’s what we’ll use:
- Backend Framework: Node.js + Express
- Language: TypeScript
- ORM: Sequelize
- Database: TiDB Cloud (MySQL-compatible, serverless)
- Hosting Platform:Render (Web Service, free tier)
Step-by-Step Setup
- Create a Free TiDB Cloud Cluster
- Head over to TiDB Cloud and create a free account.
- Once logged in, create a new cluster under the Developer Tier. This plan
- provides a fully managed, MySQL-compatible database ideal for small projects or staging environments.
After the cluster is created, open the connection details panel and copy the connection string. You’ll need this later for Sequelize configuration.
Note:TiDB Cloud requires SSL for secure connections. Ensure your client configuration enforces this.
- Configure Sequelize with SSL
In your Node.js project, set up Sequelize with SSL enabled.
Here’s an example configuration snippet:
js
const sequelize = new Sequelize(process.env.DB_NAME, process.env.DB_USER, process.env.DB_PASS, {
host: process.env.DB_HOST,
dialect: 'mysql',
dialectOptions: {
ssl: {
require: true,
rejectUnauthorized: true,
},
},
});
This ensures that your app communicates securely with the TiDB Cloud database.
- Push Your Code to GitHub
Next, push your complete Node.js backend project to a GitHub repository.
Render will automatically pull your source code from GitHub for deployment.
Ensure your repository includes the following scripts in package.json:
json
"scripts": {
"build": "tsc",
"start": "node dist/server.js",
"migrate": "sequelize db:migrate"
}
These commands handle building your TypeScript code, running the server, and applying database migrations respectively.
- Deploy Your App on Render
Go to Render.com, create a free account, and select New Web Service.
Connect your GitHub repository.
Choose the branch to deploy (usually `main` or `master`).
Set the build command as:
npm install && npm run build && npm run migrate
Set the start command as:
npm start
Under Environment Variables, add your database credentials:
DB_HOST=<your-tidb-host>
DB_USER=<your-username>
DB_PASS=<your-password>
DB_NAME=<your-database>
Render will automatically install dependencies, build your app, and start the web service.
- Test Your Deployment
Once deployed, Render will provide a live URL for your web service.
You can now test your API endpoints directly in Postman or connect from your frontend application.
Your app is now live on the internet — no paid plan, no complex infrastructure — and fully secure with SSL.
Optional: Connect to TiDB Cloud from Your Terminal or GUI
You can connect to your TiDB database directly via the terminal using:
bash
mysql -h <your-tidb-host> -P 4000 -u <your-user> -p — ssl-mode=REQUIRED
Alternatively, use a GUI like DBeaver or MySQL Workbench to manage your tables and visualize your schema. This is particularly helpful for inspecting data during development.
Why This Setup Works
This deployment workflow is ideal for developers who:
Need a temporary or staging backend for testing or demos
Want to practice full-stack deployment workflows
Are learning backend development and DevOps fundamentals
Want a simple, secure, and free hosting environment for small apps
Render and TiDB Cloud make it easy to focus on building — not infrastructure.
You get instant HTTPS, automated builds, and scalable database performance, all at zero cost for small-scale use cases.
Final Thoughts
In software engineering, simplicity and accessibility often accelerate innovation. With Render and TiDB Cloud, backend developers can deploy robust Node.js applications without worrying about cost or complexity.
Whether you’re a student experimenting with your first project, a professional testing an MVP, or a mentor helping others learn backend development this setup empowers you to deploy faster, learn deeper, and collaborate better.
Start small. Build freely. Deploy confidently.
Tags:
Top comments (0)