Build a CRUD API with TypeScript, Express, MongoDB, Zod and Jest @CodingGarden
Build a CRUD API with TypeScript, Express, MongoDB, Zod and Jest  @CodingGarden
Uploaded August 2022 | Updated November 2026, 2 days ago
This was edited from a live stream on twitch. Follow on twitch to watch live: twitch.tv/codinggarden

View the code here: github.com/CodingGarden/intro-to-typescript/tree/examples/examples/express-api

📩 Sign up for my mailing list: https://list.coding.garden/
💖 Donate: https://coding.garden/donate
😍 Pledge: https://coding.garden/pledge
💬 Discord: https://coding.garden/discord
🎉 Stickers: https://coding.garden/stickers
💻 Gear List: https://coding.garden/gear
🔎 Search for more Coding Garden videos here: https://coding.garden/videos
🗣 View the Coding Garden FAQ here: github.com/CodingGarden/faqs

00:00:00 Intro
00:00:09 Hello Friends
00:01:00 Project Template
00:01:40 Clone Template
00:02:21 Template Overview
00:05:00 Typescript with Express
00:07:23 How to find Typescript libraries
00:09:21 Install zod and mongodb
00:09:43 Folder Structure
00:11:36 Create a schema with zod
00:14:39 Create todos router
00:18:59 zod default values
00:19:20 Restructure tests
00:21:31 Our first test
00:25:35 mongodb setup
00:29:23 collection / model setup
00:31:00 findAll handler
00:33:22 test beforeAll collection drop
00:34:47 close database connection after tests
00:36:23 jest and supertest explained
00:38:01 refactor request handlers
00:39:57 Service / Controller / DAL explained / best practices
00:43:25 Express Error Handling
00:46:18 createOne handler
00:49:55 createOne tests
00:58:30 tests are nice
00:59:01 request validation middleware refactor
01:07:40 findOne handler
01:13:09 findOne tests
01:16:00 zod ObjectId validation
01:20:43 updateOne handler setup
01:22:57 updateOne tests
01:27:23 updateOne handler implementation
01:29:02 deleteOne handler setup
01:30:28 deleteOne tests
01:32:29 deleteOne handler implementation
01:36:13 we did it
01:36:44 findAll correction
01:37:49 Thank You!
01:38:40 catJAM
Build a CRUD API with TypeScript, Express, MongoDB, Zod and JestLack of Mid / Senior devs will soon be a crisis... #programming #advice #webdevelopment #coding #AI🗺  Building a Twitch Check-In Map with Leaflet.js, React + hooks and tmi.jsAdvent of Code 2023 - Day 1 - Solving with JavaScriptPart 1 - Using .NET 5 + C# to Setup a CRUD API on a Mac | MSSQL + Entity  Framework + SwaggerTrying Redis Queues | Try Day Friday⚡️ Trying Supabase.io for the first time | Building a Japanese Pokemon Card DatabaseProductivity Advice: Dont use tools just to use tools.Can we really trust AI? #AI #vibecoding #programming #advice #justchatting #webdevelopment #coding
Coding Garden |

Build a CRUD API with TypeScript, Express, MongoDB, Zod and Jest

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER