NOTES
Objective
Use Nodejs runtime, Typescript, ExpressJs, Typeorm, PostgreSQL, Beekeeper and Bruno to create an api from scratch. Create a Task and Todo Manager.
Module 1: Foundations & TypeScript
Project Initialization & Tooling
Initialize nodejs project environment
npm init -y
Install and configure Typescript
npm install -D typescript @types/node tsx
Initialize typescript configuration
npx tsc --init
TypeScript Fundamentals for Backend
types: string, boolean, number, any
variables
const username = "doeman" ;
let isActive = false ;
let age = 25 ;
const numberOfPoints = [ 2 , 3 , 4 , 5 ] ;
const profile = { name : "John Doe" , isEngineer : true , } ;
let profileColor : "red" | "green" | "blue" = "blue" ;
Enter fullscreen mode
Exit fullscreen mode
conditions
let color : "red" | "green" | "blue" = "blue" ;
if ( color === "red" ) { console . log ( "This is red" ) ; } else if ( color === "green" ) { console . log ( "This is green" ) ; } else { // this means the default (color console .…