Deploying a TypeScript Express application to Render

Bjorn Krolsavatar

Bjorn Krols

Published on
02 March 2022

In this tutorial you will learn how to deploy a TypeScript Express application as a Render Web Service.

The final code of this article can be found here.


  • A Render account
  • A GitHub or GitLab account
  • A computer with Node.js and NPM

Creating the application

npm init -y
npm install typescript ts-node @types/node --save-dev
npm install express
npm install @types/express --save-dev


  "compilerOptions": {
    "esModuleInterop": true,
    "outDir": "./dist"


import express from "express";

const application = express();

const port = 3000;

  .get("/", (req, res) => {
      message: "Hello, World!",
  .get("/random", (req, res) => {
      number: Math.floor(Math.random() * 100),

application.listen(port, () => {
  console.log(`Application listening on port ${port}`);

To run the application locally:

npx ts-node ./src/application.ts

Deploying the application

Add the following build and start commands to the scripts section of your package.json:

  "scripts": {
    "build": "tsc",
    "start": "node ./dist/application.js"

Create a new Web Service on Render, and give Render permission to access your repository.

Configure the following settings:

  • Environment: Node
  • Build Command: npm ci; npm run build
  • Start Command: npm run start

That's all! Don't forget to delete the Web Service once you're done testing.

The final code of this article can be found here.

Subscribe to our newsletter

The latest news, articles, and resources, sent to your inbox weekly.

More like this