This sample is constructed using Visual Stuido Code 1.38.1, so the editor is required if you want to modify run the application out of the box. You may also use another IDE of your choice, but some code structure may need some modification or conversion.
Note: This sample is constructed with TypeScript v3.6.3 that depends on NodeJS v10.16.3.
This project uses the following library:
- Axios →
npm i axios
- TS Stopwatch →
npm i ts-stopwatch
A TypeScript (.ts) code is transpiled into JavaScript (.js) file using VSCODE internal task runner, so it can be run using node
command.
Before that:
- Download as ZIP and extract
- In VSC, File > Open Folder
To transpile code automatically, do this:
- Hit
ctrl + shift + B
- Select
tsc:watch - tsconfig.json
A terminal will be displayed with current TypeScript compiler watch status. This watching behavior happened in real-time.
Please ensure that the real-time compiler watch status is always happen. Otherwise, new changes in your TypeScript code will never renewed in JavaScript code.
More information: https://code.visualstudio.com/docs/typescript/typescript-compiling
After doing all above, to run the sample:
- Make sure to change the required information in
app.ts
file - Terminal > New Terminal
- type
node app.js
(.js and NOT the .ts) and hit enter