NodeJS Typescript Production grade setup template

Shuvrojit Biswas
9 min readSep 18, 2024

You can also read the story for free here.

In this article, we’re going to build a production grade setup template for nodejs with typescript. We’ll also cover linting, formatting, building, running and testing the project in a production-ready way. We’ll explore each tool, the problems they solve, and why they’re essential for building a production-grade setup. We will use tools like eslint, prettier, pm2, cross-env to make sure our starter template looks more and more production grade and works on all platforms. So let’s dive in.

Let’s start by creating the project directory. You can use the mkdir command or any graphical file manager based on your preference. Afterward, we’ll initialize a Git repository to track project changes over time. For managing packages, we’ll use Yarn, although you can choose between npm and Yarn based on your preference. In this project, we’ll go with Yarn due to its performance and enhanced feature set. We’ll also use the -y flag to automatically generate the necessary project files with default values.

# create direcotry
mkdir node-boilerplate

# change directory
cd node-boilerplate

# initialize git repo
git init

# initialize yarn
yarn init -y

Now that we’ve set up the basic structure, let’s move on to configuring the tools needed to ensure a smooth development workflow.

Typescript

Next, we’ll set up TypeScript. Since Node.js cannot directly run TypeScript…

--

--

Shuvrojit Biswas

Product Designer and Full Stack Developer who loves building digital products. If you have a project feel free to give me a knock.