Express JS with TypeScript - Setup, Examples, Testing

Veröffentlicht am: 11 März 2024
auf dem Kanal: Anson the Developer
32,650
1k

DISCLAIMER

This is NOT a full in depth tutorial on Express JS. It is only designed to walk you through the setup process of installing TypeScript, getting it up and running with Express, and show you examples of type annotating arguments. I have also added other examples with Unit Testing & Integration testing with Jest and ts-jest.

I highly recommend you use this as a way to learn how to setup a TypeScript project for Express, and then slowly migrate over your code. Many of the concepts covered in my Express JS Full Course can easily be translated over once you get the idea of what to type annotate.

Link to Express JS 8 Hour Course:    • Express JS Full Course  

Code Repository: https://github.com/stuyy/express-type...

Support the Channel:

Become a Member: https://www.youtube.com/ansonthedevel...
Become a Patreon:   / stuyy  
Buy me a Coffee: http://ko-fi.com/anson
Donate on Streamlabs: https://streamlabs.com/ansondevacadem...
Donate on PayPal: https://paypal.me/ansonfoong

Connect with me:

Twitter:   / ansonthedev  
Discord:   / discord  
GitHub: http://github.com/stuyy
Twitch:   / stuy  

0:00 - Project Setup
3:00 - Install Typescript
8:40 - tsconfig.json file
9:44 - Configuring TypeScript
13:00 - Compile TS Files
16:30 - Nodemon with Typescript
20:27 - Basic Type Annotations
35:08 - Type annotate Request Body
41:22 - Type annotate Query Parameters
43:41 - Type annotate Route Parameters
44:38 - Type annotate Response Body
51:06 - Extend Request Interface
54:50 - 3rd Party Libraries with TS
59:45 - Unit Tests with Jest and TS
1:08:25 - Integration Tests with Supertest
1:20:45 - Integration Tests


Auf dieser Seite können Sie das Online-Video Express JS with TypeScript - Setup, Examples, Testing mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Anson the Developer 11 März 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 32,650 Mal angesehen und es wurde von 1 tausend den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!