This project will introduce you to both Node.js and TypeScript in a simple to follow, step-by-step format.
You should already have a decent understanding of JavaScript.
-
Node.js version 6.9 LTS (later versions should also work)
Follow the instructions here to install Node.js
Run
node -v
to check your current version
TypeScript lets us use the latest JavaScript features and also provides static typing which can make code much less error prone. Types are optional and inferred very intelligently which makes them unobtrusive.
Don't be scared away by the name -- Visual Studio Code is very different to the full-blown Visual Studio. It is free, open-source, stable, and cross-platform.
You can use any editor you'd like but Visual Studio Code offers full TypeScript support 'out of the box' and an excellent debugger.
-
Clone this repository by running
git clone https://github.com/DunedinJS/typescript-nodejs-intro.git
-
cd ./typescript-nodejs-intro
If using NVM to manage Node.js versions you should also run
nvm use
here to make sure that the correct version is active. -
Checkout the branch for the first step by running
001-setup
-
Refer to the readme for the branch
There is a different branch for each stage of the project. They each contain their own readme with specific details and are numbered so that the order is clear. For example 001-setup
, 002-node-basics
...
After checking out each branch make sure to run npm i
to install dependencies.