Part 1. Node.js + TypeScript API: Installation and Setup
This is the first installment in a series of guides showing how to create a Node.js + TypeScript API. The initial pieces will be very simple, but as we progress, I will be showing how to add features that would be expected in a production-quality API. You can find the repo for this project here: https://github.com/JWLangford/node-typescript-api.
You can also find a video walkthough here: https://youtu.be/SNAUpMJ4AWo
This installment will cover the installation and setup of the project.
Prerequisite Installs
Before going further, make sure you have these installed on your machine.
Nodejs
https://nodejs.org/en/Command Check: node -vYarn
npm install -g yarnCommand Check: yarn -vTypescript
npm install -g typescriptCommand Check: tsc -v
Getting Started
To get started, create the directory your API will inhabit.
mkdir node-typescript-api
cd node-typescript-api
Next, setup your project with yarn
yarn init -y