Learn Express JS With TypeScript

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ต.ค. 2024

ความคิดเห็น • 87

  • @JoJoAcrylicArtwork
    @JoJoAcrylicArtwork 9 หลายเดือนก่อน +5

    finally a tutorial that doesn't leave you hanging on getting the fuller pic for proper type safety and production level usage. Thanks Tom

  • @basiccoder2166
    @basiccoder2166 ปีที่แล้ว +2

    Watch entire video without getting bored or distracted. Beautifully explained

  • @MrKeepItTrill
    @MrKeepItTrill 2 ปีที่แล้ว +5

    Came with the intention of skimming this just to see what I need to do to get Express working with TS (turns out not much). Left with one of the best and clearest introductions / refreshers on Express in general that I've ever seen.

    • @TomDoesTech
      @TomDoesTech  2 ปีที่แล้ว

      So glad you liked it :)

  • @Skylla54
    @Skylla54 2 ปีที่แล้ว +10

    I did a 40 hours node js course.
    These tutorial are just amazing to keep all the concepts and techniques fresh for my next Hackathon. 🤤
    And perfect 4 dinnertime :)) 🍖

  • @mizouhamza3244
    @mizouhamza3244 2 ปีที่แล้ว +1

    I recommend to any new comer to Nodejs with Express. This video is what you need to start and get on your feet, personally I definitely enjoyed it.

  • @GeorgiosAmsterdam
    @GeorgiosAmsterdam 4 หลายเดือนก่อน

    Looks like I finally found the video that I need, and for the first time I see an instructor using YARN..... never a break.

  • @7MaticCode
    @7MaticCode 9 หลายเดือนก่อน +1

    This is the best tutorial for express with typescript. Thank you for this tutorial I learned a lot

  • @stijnschuurman9347
    @stijnschuurman9347 3 ปีที่แล้ว +7

    Thanks Tom! I was confused with the `app.use(express.json())` because for some reason it did not function as it should for certain versions. Explained the middleware part really good. Thanks a lot :)

    • @chiragsharma4799
      @chiragsharma4799 2 ปีที่แล้ว

      github.com/chiragmehta900/node-typescript-boilerplate-postgres
      Hey guys, try out this node js typescript boilerplate Please stare at this repository if you like this.

  • @Creamworks
    @Creamworks 3 ปีที่แล้ว +10

    Fantastic video! I'd also love to see a deep dive tutorial on Express + Mongoose with TS (file structure, strict typing etc.).

  • @gosnooky
    @gosnooky ปีที่แล้ว +1

    NestJS is the goat. Not to confuse with NextJS, the React framework. Some people hate on it because it's TS first and feels a lot like Java/Spring or Angular, but those are both good things in my book because on the emphasis on type-safety and modularity.

    • @TomDoesTech
      @TomDoesTech  11 หลายเดือนก่อน

      Yeah, not a fan of NestJS

  • @angrysmilex
    @angrysmilex 2 ปีที่แล้ว +1

    28:25 - Request & response generics - YOY!! I finally find this useful and simple solution

  • @jereramirez7433
    @jereramirez7433 2 ปีที่แล้ว +4

    Tom, this is so helpful! Im coming from Java-Spring stack and this is helping me so much to understand what I need to do to work as I used to. THANK YOU!

  • @josephjoey3904
    @josephjoey3904 3 ปีที่แล้ว +7

    Great work Tom. I have gotten the hang of TS with React but not much on the back end side

    • @vilijanac
      @vilijanac 3 ปีที่แล้ว

      It is itself an fake back end side. Client needs at the front end needs to present. Receives only string of text. Most web browsers will reject as an web page.

    • @josephjoey3904
      @josephjoey3904 3 ปีที่แล้ว +5

      @@vilijanac wtf u talking about?

  • @true_visual
    @true_visual 8 หลายเดือนก่อน

    I am close to complete my Angular course at the moment. I will soon need to learn Express to come closer to MEAN and I am so excited. Can someone learn Express in 40 minutes though? It seems short unless it's really that quick to learn Express! Thank you very much for this!

  • @postgres2269
    @postgres2269 ปีที่แล้ว +1

    Thanks a lot for sharing this great knowledge for free. I never thought I would learn many new things from you.

  • @Kamilek96
    @Kamilek96 2 ปีที่แล้ว +1

    Great tutorial. Could you advise me, which of your tutorial should I take next, if i interested in backend stuff? Many thanks =)

    • @TomDoesTech
      @TomDoesTech  2 ปีที่แล้ว +1

      You could try building the auth API th-cam.com/video/qylGaki0JhY/w-d-xo.html

  • @arberi99
    @arberi99 3 ปีที่แล้ว +4

    Thank you for this amazing video!

  • @oz4549
    @oz4549 2 ปีที่แล้ว +1

    underrated channel

  • @nextdev3637
    @nextdev3637 2 ปีที่แล้ว +2

    Wow, I was searching for it since 1 hour.

  • @taosade
    @taosade 2 หลายเดือนก่อน +1

    what's the extension for such a cool terminal in vscode?

  • @adventurer2395
    @adventurer2395 2 ปีที่แล้ว

    You’re a good teacher, and this complements your other API video that had a faster pace. Since you’re using TS, it would be awesome to see an object-oriented API.

    • @TomDoesTech
      @TomDoesTech  2 ปีที่แล้ว

      Thank you :) Yeah I will think about an OOP approach, I do prefer more functional programming though.

    • @jessejulian9069
      @jessejulian9069 ปีที่แล้ว

      @@TomDoesTech Whats the difference between the two if i may ask? Is it simply receiving and returning JSON?

    • @TomDoesTech
      @TomDoesTech  ปีที่แล้ว

      @@jessejulian9069 There's a lot different, It will just confuse you if I try explain it in a comment. There should be lots of videos on YT explaining it

  • @TCErnesto
    @TCErnesto 2 ปีที่แล้ว +1

    11:36 is it needed to type the parameters? TypeScript is pretty good at inferring types. In this case, thanks to the signature of `get`, VSC and we know the types of `req` and `res`

  • @martinlupa8692
    @martinlupa8692 ปีที่แล้ว +1

    Great video! Thank you!

  • @mossaabkanzit9403
    @mossaabkanzit9403 2 ปีที่แล้ว

    That was really instructional! Maybe in a future video you can cover clean / hexagonal architecture with express and typescript. Thanks for the video and looking forward to more videos.

    • @TomDoesTech
      @TomDoesTech  2 ปีที่แล้ว +1

      Thanks for the suggestion. I will look into hexagonal architecture and see if it's something I'd make a video out of

  • @k12i
    @k12i 2 ปีที่แล้ว +1

    Hey Tom, what did you use for formatting the code with auto save? Is it prettier?

  • @marianofarace308
    @marianofarace308 2 ปีที่แล้ว +1

    Hi Tom, I'm getting an error on every empty bracket here "req: Request", Don't use `{}` as a type. `{}` actually means "any non-nullish value". How do you deal with that?

  • @jamesperalta2870
    @jamesperalta2870 ปีที่แล้ว +1

    great work!

  • @2gbeh
    @2gbeh 6 หลายเดือนก่อน +1

    Let's go 👍

  • @codforc
    @codforc ปีที่แล้ว +1

    thank you!

  • @jessejulian9069
    @jessejulian9069 ปีที่แล้ว

    Hey Tom, what script would we use to run the server in production?? I'm referring to the scripts we add within the package.json file in order to run our server. I've watched a few of your videos on Express with TypeScript but I've only seen you set a script for Development

  • @mybuddy11
    @mybuddy11 ปีที่แล้ว

    could you please a lecture on micro service with express -typescript?

  • @tadeuszjiwu255
    @tadeuszjiwu255 ปีที่แล้ว

    Thank You Tom, great tutorial!

  • @k12i
    @k12i 2 ปีที่แล้ว +1

    Thank you Tom for the amazing explanations! I have learnt heaps just from this tutorial :)

  • @valentinussofa4135
    @valentinussofa4135 2 ปีที่แล้ว

    Thanks for this tutorial. I want to ask, Why you don't use nodemon package?

  • @HologramJay
    @HologramJay 2 ปีที่แล้ว

    Thanks for the tutorial, Tom. It was really helpful. I just had a quick question. When typing the Request object, how would we access ResBody? I'm trying to set its type to a string, but I can't seem to figure out how to log it out like I can with req.params, req.body, and req.query.

  • @yoman9446
    @yoman9446 3 ปีที่แล้ว

    Thanks a lot!
    Can you do a tutorial on using NextJS with custom express backend with typescript?

  • @savithadatchu1534
    @savithadatchu1534 2 ปีที่แล้ว

    Hey Tom, What is the use of express interfaces, when even without them the inbuilt functions of req and res are accessible directly.

    • @TomDoesTech
      @TomDoesTech  2 ปีที่แล้ว +2

      If you pass req and res to a controller for example, in the controller the interfaces are not accessible, so explicit types are helpful

  • @pheonixking1234
    @pheonixking1234 2 ปีที่แล้ว +1

    Very good tutorial!

  • @talhakhadim111
    @talhakhadim111 ปีที่แล้ว

    which tool are you using for auto complete in cli?

    • @TomDoesTech
      @TomDoesTech  ปีที่แล้ว +1

      I think it's zsh-autocomplete

  • @howuseehim
    @howuseehim ปีที่แล้ว

    How do you build for production? 😢

  • @filipedonatti8872
    @filipedonatti8872 2 ปีที่แล้ว

    could explain what is .locals at 28:50 ?Maybe explain a little further about its usability if you don't mind

    • @TomDoesTech
      @TomDoesTech  2 ปีที่แล้ว

      The res.locals object has properties that are local variables within the response, and will be available in templates rendered with res.render

  • @MassGueye-sr4kj
    @MassGueye-sr4kj ปีที่แล้ว

    what was that technic names with middleware

  • @editingtuto1.011
    @editingtuto1.011 ปีที่แล้ว

    I Want to learn session management with typescript.

  • @indigosay
    @indigosay 2 ปีที่แล้ว

    You should teach us to extend Request witn additional properties, bro

  • @rathan235
    @rathan235 2 ปีที่แล้ว

    well explained!

  • @logarithm0
    @logarithm0 2 ปีที่แล้ว +1

    Top

  • @coderboysobuj
    @coderboysobuj ปีที่แล้ว

    How to i deploy express typescript project on cpanel?

  • @devloperadda1350
    @devloperadda1350 3 ปีที่แล้ว +1

    Thanks

  • @Euquila
    @Euquila 2 ปีที่แล้ว

    Personally, I use Typescript very minimally. Like, I would never type Request, Response, and NextFunction... that would annoy me as all hell. I might type out the shape of an object or props or something though

    • @TomDoesTech
      @TomDoesTech  2 ปีที่แล้ว +1

      That's the beauty of TypeScript, it's more opt-in.
      I usually don't add types for everything, especially if TS knows the type implicitly.
      However, I add more types in these videos because I want to stress how to find the types that can be used by going into the module and seeing what's exported.

  • @Randomuser21265
    @Randomuser21265 3 ปีที่แล้ว +1

    Where is the github link?

    • @TomDoesTech
      @TomDoesTech  3 ปีที่แล้ว +4

      I haven't added it to GitHub because there was no real working code. I can make a repo with all the examples if that would help

  • @IkraamDev
    @IkraamDev 3 ปีที่แล้ว

    My boss told me Golang is a better tool than NodeJS. It would be interesting if you learnt Go and made a video like this in Go.

    • @TomDoesTech
      @TomDoesTech  3 ปีที่แล้ว +3

      For what specifically is Go better than Node.js?
      yeah, I've wanted to learn Go for ages but have only dabbled in it a little bit.

  • @kalush81
    @kalush81 2 ปีที่แล้ว

    There is almost no typescript involved in this video.

    • @TomDoesTech
      @TomDoesTech  2 ปีที่แล้ว +2

      I don't think stuffing types in where they don't improve the DX is an appropriate use of TS, therefore there is enough TS in this video.
      If you disagree, that's fine but welcome to tech where nobody agrees on anything.

  • @kirarevcrow
    @kirarevcrow 2 ปีที่แล้ว

    You barely talked about the error handling.

    • @TomDoesTech
      @TomDoesTech  2 ปีที่แล้ว

      I talked about it enough in terms of Express, since it's just normal Node error handling.

  • @mjerez6029
    @mjerez6029 ปีที่แล้ว

    Is 2023 last thing you should do is express, there are waay better alternatives. Express is just awful

    • @TomDoesTech
      @TomDoesTech  ปีที่แล้ว +1

      What if you are interviewing for your dream job and they have a large Express app and expect you to know how to use it? Probably pretty import to learn it.

    • @TomDoesTech
      @TomDoesTech  ปีที่แล้ว

      Otherwise I'd agree, I always start new projects with Fastify

  • @tejasjani2544
    @tejasjani2544 ปีที่แล้ว

    Js realised it's mistake and want be a java

  • @aayushdhakal4142
    @aayushdhakal4142 2 ปีที่แล้ว

    No explanation at all. Just keeps on writing code, very disappointing.

    • @TomDoesTech
      @TomDoesTech  2 ปีที่แล้ว

      Sorry, I'll give your money back

    • @aayushdhakal4142
      @aayushdhakal4142 2 ปีที่แล้ว +1

      @@TomDoesTech give my time back

    • @TomDoesTech
      @TomDoesTech  2 ปีที่แล้ว

      @@aayushdhakal4142 I didn't strap you down and make you watch it

    • @aayushdhakal4142
      @aayushdhakal4142 2 ปีที่แล้ว +1

      @@TomDoesTech you put it on youtube to watch

    • @TomDoesTech
      @TomDoesTech  2 ปีที่แล้ว

      @@aayushdhakal4142 Exactly, no restraints involved