Menu

1 / 2

The Complete Beginner’s Guide to Backend Development with Node.js, TypeScript & PostgreSQL

DEV Community: postgres·Michael Otu·15 days ago
#CFRkTGzG
#devtopostgresql#devto#dev#task#enter
Long article (7804 words) — no AI summary yet.
Reading 0:00
15s threshold

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 .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.