Member-only story

How to set up a Node 16, Express & Typescript API

Richard Oliver Bray
4 min readOct 20, 2021

--

I’ve been working on changing up one of my python projects to typescript and it surprises me that in 2021 there isn’t a CLI tool or script that can set this up for you already. You can tell I’m from the frontend world 😃

Anyway, I’ve put this article together to help others who want to do the same and use the latest build tools to do so.

Explanation video 📹

https://youtu.be/7EeGHUs4zfs

Note: The steps below are quite brief, if you want more of an explanation watch the video.

Install Packages 🎁

  1. Create a new directory mkdir <my-awesome-project>
  2. cd into that directory and initialise npm with all the defaultsnpm init -y
  3. Install Express npm i express
  4. Install Typescript with the express and node types npm i typescript @types/express @types/node -D
  5. We’re going to use SWC to transpile the TS to JS for prod so install all of these things npm i @swc/cli @swc/core -D
  6. We’re going to use Nodemon to watch the dev environment, you can install it withnpm i nodemon -D

--

--

Richard Oliver Bray
Richard Oliver Bray

Written by Richard Oliver Bray

Co-founder of orva.studio. Building digital products and teaching others to do the same. Saved by grace.

Responses (2)