|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/building-apis-doing-tdd-in-node-and-typescript-and-jest/
课程评论:没有评论
课程名称:使用 Node.js、TypeScript 和 Jest 进行 API 构建与测试驱动开发 (TDD) 课程概述: 本课程将引导学员从零开始,学习如何使用 Node.js、TypeScript 和 Jest 来实现一个 RESTful API,并全程采用测试驱动开发 (TDD) 的方式。我们将遵循“由内而外”的 TDD 方法(也称为经典主义或芝加哥学派 TDD),从应用程序的核心开始,逐步构建到满足所有业务需求,确保编写的每一行生产代码都有相应的测试覆盖。 本次课程要实现的 API 是一个“一次性秘密”网站的克隆。该应用程序能够存储用户的秘密信息,并提供一个 URL 供用户稍后访问。关键在于,每个 URL 只能被访问一次。如果尝试第二次访问相同的 URL,将收到错误。我们将使用 MongoDB 作为持久化存储层。 课程内容将涵盖: * **业务需求分析**:深入分析“一次性秘密”的核心业务逻辑。 * **设计与实现**:学习如何将业务需求转化为高质量、可工作的代码。 * **TDD 实践**:全程采用 TDD 方法进行开发,确保生产代码始终处于可控状态。 * **技术栈**:Node.js、TypeScript、Jest、MongoDB。 * **架构灵感**:从领域驱动设计 (DDD)、六边形架构 (Hexagonal Architecture) 和命令查询职责分离 (CQRS) 中汲取灵感,以设计出健壮的解决方案。
In this course we are going to implement from scratch a REST API in Node using Typescript and testing with Jest, but using Test Driven Development (TDD). During this exercise, we will follow the Inside-out TDD approach also known as classicist or referred also sometimes as Chicago school TDD. We will start from deep inside our application and build our way out until we have meet all the business requirements, being at any time covered by our own tests. The API we are going to build is a clone of the One Time Secret site. We will create an application that stores our secrets and provides us a URL to access them later, but with the condition that we can access that URL one time only. Whenever we attempt to retrieve the same secret again, hitting the same URL for a second time, we will receive an error. We will use a mongodb as a persistence layer. At the beginning of this course, we will analyze the business requirements just mentioned before and we will see how we translate that into working and well crafted code. We will see how we design the application and how we implement it, using a TDD approach having all the time our production code under control. We will get some inspiration from DDD, Hexagonal arch and CQRS to design our solution.Kudos to @Panos for the constructive feedback that helped to make this course better.