

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Welcome to the Blog Aggregator
incomplete
2: Build
incomplete
3: Config
incomplete
4: Commands
incomplete
This lesson's interactive features are locked, please to keep using them
By the end of this step, you'll have a simple working program in Node!
npm install -D typescript @types/node tsx
The -D flag installs the packages as development dependencies, which means they won't be included in your production build.
{
"compilerOptions": {
"baseUrl": ".",
"target": "esnext",
"module": "esnext",
"rootDir": "./src",
"outDir": "./dist",
"strict": true,
"moduleResolution": "Node",
"esModuleInterop": true,
"skipLibCheck": true
},
"include": ["./src/**/*.ts"],
"exclude": ["node_modules"]
}
include specifies the files to include in the compilationexclude specifies the files to exclude from the compilationstrict enables all strict type checking optionsesModuleInterop allows you to use ES module syntaxmoduleResolution specifies how modules are resolvedbaseURL specifies the base directory for module resolution{
...
"type": "module",
"scripts": {
"start": "tsx ./src/index.ts"
},
...
}
function main() {
console.log("Hello, world!");
}
main();
npm run start
If you see "Hello, world!" printed in the console, you're good to go!
Submit the CLI tests.