Creating a Dev Container for TypeScript and VS Code — Part 2
Full-time Node.js dev container for less installation effort and more consistency.
Building on what we created in part 1, in this article we’ll cover:
- Initializing the Node.js project with npm
- “Hello, world!” console app in TypeScript
- “Hello, world!” web app in TypeScript
- Being specific about versioning
- Keeping dependencies up to date
Introduction
At the end of part 1, we have a dev container with Node.js and npm installed. We also have a suitable set of VS Code extensions for TypeScript development.
In part 2 we will complete the creation of the dev container by initializing the npm package and by installing the TypeScript compiler. We will also investigate a simple way to run a console application and a web site. We will conclude the article with some thoughts about managing dependencies.
The complete source code for this article is available on github.
Italics: As in the previous part, all is designed to run on Linux, MacOS and Windows without code changes. However, I will use italics to describe differences that are…