No video

Node.js Backend Project Setup with Typescript, ESLint, Prettier, and Jest

  Рет қаралды 31,292

CodeDunks

CodeDunks

Күн бұрын

Walkthrough of how I like to set up my Node.js backend projects. Configured with Typescript, ESLint, Prettier, Jest, Nodemon, environment variables, and debugging.
TSConfig Options: www.typescript...
ESLint Config Docs: eslint.org/doc...
Prettier Options: prettier.io/do...
Project Github repo link: github.com/leo...
0:00 Intro & Initialize Project
6:25 Typescript Install
7:58 ESLint Install
13:19 Prettier Install
16:45 ESLint Config
24:39 Typescript Config
29:10 Testing Project Configurations
34:50 nodemon install and config
38:28 dotenv-safe install and config
41:40 Debugging
43:05 Jest install and config
49:30 Exclude tests from build
50:45 End

Пікірлер: 66
@Scetils
@Scetils 3 жыл бұрын
This was such a solid first video Leo! Really appreciate it and can't wait to go through more. 🤺
@HosseinBajan
@HosseinBajan 4 ай бұрын
It was the best node environment that I have seen so far, it was really great, thank you
@TobiAkinyemi-mq5mh
@TobiAkinyemi-mq5mh Жыл бұрын
👌, thank you for taking time to explain why you did something and a brief description on what it's actually doing .
@hidden_from_you
@hidden_from_you 3 жыл бұрын
I am a front-end developer, but your tutorial very useful for me, great job thanks! Wishing for more than a million views!
@CodeDunks
@CodeDunks 3 жыл бұрын
Appreciate it Rinat!
@xc1726
@xc1726 2 жыл бұрын
i'm korean university student. Despite my poor English, your explanation was very helpful. Thank you !! 👍
@sanjitselvan5348
@sanjitselvan5348 Жыл бұрын
The knowledge you've given us in this video is priceless. Thank you! 🙌
@varadharajmahendran
@varadharajmahendran Жыл бұрын
AQQ
@serhiiocean2662
@serhiiocean2662 3 жыл бұрын
the best guide that I've found (not on youtube but in general) that covers everything that I needed! I literally spent a few hours reading some articles/watching videos but non of it was like this video, thanks!
@CodeDunks
@CodeDunks 3 жыл бұрын
Glad I was able to be of some help!
@amazonreviews2524
@amazonreviews2524 2 жыл бұрын
This is amaze-balls! Thank you Leo. You helped me tremendously. :)
@twiksify
@twiksify 2 жыл бұрын
I should put this on repeat just because you deserve a lot views. Very well structured and explained, top notch!
@ahmedswerky9700
@ahmedswerky9700 2 жыл бұрын
Such an awesome/comfortable environment, Hope to see more
@jeremiahakpera3457
@jeremiahakpera3457 Жыл бұрын
This is exactly what I was looking for. Thank you
@chinedumnwankwo5166
@chinedumnwankwo5166 2 жыл бұрын
Great video that covered almost what I needed. I would also like you to add API and database feature and testing with jest. Thumbs up Leo..
@ashishkarki4880
@ashishkarki4880 3 жыл бұрын
greatly technical and useful video. Please keep them coming. thanks a lot
@leonardparan7291
@leonardparan7291 2 жыл бұрын
You're one of the best dude, thank you so much
@user-sv2hb9ik2u
@user-sv2hb9ik2u Ай бұрын
This is helpful. Thank you
@goshmain982
@goshmain982 3 жыл бұрын
This is such informative and literary everything I needed.
@mealcode
@mealcode 3 жыл бұрын
thanks leo for this gold content. Keep going :)
@purchtechnologies3414
@purchtechnologies3414 5 ай бұрын
This is solid. Thanks
@ThijmenCodes
@ThijmenCodes 2 жыл бұрын
Great video, you really cover everything from A to Z. Thanks!
@zero__gravity_Shekhawat777
@zero__gravity_Shekhawat777 3 жыл бұрын
Great work waiting for more videos
@DaumChannelGamePart
@DaumChannelGamePart 2 жыл бұрын
wow. this is the best practice ever!
@nishalgoud222
@nishalgoud222 3 жыл бұрын
awesome !.Please keep them coming.
@utsavojha2953
@utsavojha2953 2 жыл бұрын
Awesome walkthrough Leo, good stuff! 🚀 subscriber++
@yashshah7673
@yashshah7673 Жыл бұрын
Too good Leo!! Thank you very much! :-)
@mahendranath2504
@mahendranath2504 3 жыл бұрын
excellent, next time a small suggestion is to increase the font size on VS code editor as its small font hard to focus on your typing , it's a great content 👍
@CodeDunks
@CodeDunks 3 жыл бұрын
Yes I apologize, first video I thought for some reason you guys could see what I could. Won't be happening in my future videos. Thanks for the feedback!
@mahendranath2504
@mahendranath2504 3 жыл бұрын
@@CodeDunks no need for apologies, it happens, we learn from mistakes,you are doing a great job 👏👍
@marioibarra668
@marioibarra668 2 жыл бұрын
Leo thanks for a great tutorial. It helps me a lot to understand the set-up. Just one small comment: you need to zoom out. Difficult to see what the names of the files. Thanks again.
@jeremiahblessing3891
@jeremiahblessing3891 3 жыл бұрын
13:21 If you are not familiar with Prettier, that's me. LMAO XD
@jackiedo2959
@jackiedo2959 2 жыл бұрын
Amazing walk through bro, thumbs up for this!!!! :)
@qianjinqin8293
@qianjinqin8293 2 жыл бұрын
Thank you, Leo.
@user-sg4kw8uh3m
@user-sg4kw8uh3m 11 ай бұрын
awesome!
@coadingwithdharma
@coadingwithdharma 3 жыл бұрын
NIce work, keep it up bro
@ThangTran-fe5oz
@ThangTran-fe5oz 2 жыл бұрын
You can help me? import app from '@src/config/express'; Unable to resolve path to module '@src/config/express'
@muasx1985
@muasx1985 2 жыл бұрын
NICE! (with the capitals)
@kodingmania1787
@kodingmania1787 3 жыл бұрын
Thank you a lot ,, you are helpfully
@CodeDunks
@CodeDunks 3 жыл бұрын
Glad I could help!
@igdev6095
@igdev6095 2 жыл бұрын
Thanks for your video, it's very very helpful for me. But I have a problem, if I delete a file .ts in folder src then ts complier not auto remove it in folder dist. How can I fix that? Thank u so much!
@CodeDunks
@CodeDunks 2 жыл бұрын
Just to be sure I understand here, you want the associated deleted file not to be in the dist folder after deleting its source file automatically? Or After you run the build again? Automatically you could maybe look into www.npmjs.com/package/gulp. If build isn't removing them then I would try making your build script something like "build": "rm -rf dist && tsc"
@shiroclown6131
@shiroclown6131 3 жыл бұрын
Appreciate this but 720p is just not clear enough. Maybe increase the fonts size?
@miteshsagar8149
@miteshsagar8149 2 жыл бұрын
Awesome 👍😎
@kolynzb
@kolynzb 2 жыл бұрын
Thanks bro
@user-ep5yq8ek3e
@user-ep5yq8ek3e 2 жыл бұрын
great job
@christofernguyen6282
@christofernguyen6282 2 жыл бұрын
Hi, How did you setup the nvm on windows? Great video btw!
@CodeDunks
@CodeDunks 2 жыл бұрын
github.com/coreybutler/nvm-windows
@fooked1
@fooked1 Жыл бұрын
Thanks for the video. I noticed you added tsconfig-paths, but I don't think you covered what it does or how to use it. Can you describe what value it brings into the configs you setup?
@Confusedcapybara8772
@Confusedcapybara8772 2 жыл бұрын
leo, can you share your bashrc? How did you get the git branch names?
@michrisoft
@michrisoft 2 жыл бұрын
Pretty sure that's just from using the git bash shell
@scotty8789
@scotty8789 3 жыл бұрын
Great video! Learned a lot. Couple things not working for me though. Initially, the auto formatting wasnt working but I was able to fix it by setting prettier as my formatter and enabling format on save within the vscode settings. This seemed to work but when adding dotenv-safe I noticed it would not automatically move the import statement above my add function import. Any ideas why this could be? I followed all your steps exactly except for using npm instead of yarn and using json instead of js for eslintrc
@scotty8789
@scotty8789 3 жыл бұрын
Disabling prettier in vscode as a formatter and enabling eslint as default formatter seems to have fixed it. My code will autoformat with eslint and prettier settings on save. Is this the correct way to set these extensions in my vscode settings?
@CodeDunks
@CodeDunks 3 жыл бұрын
@@scotty8789 Hey Scott, so there are a couple of ways to mess with your vscode settings. Either how you did it, or you can play around with the settings.json file, you can find this file by doing CTRL + SHIFT + P and typing in settings, then choose open settings (JSON). Here is a link to my vscode settings I just added it up to by blog-tube repo github.com/leoroese/blog-tube/blob/main/settings.json Hope this helps
@scotty8789
@scotty8789 3 жыл бұрын
@@CodeDunks Thank you!
@dungam9402
@dungam9402 7 ай бұрын
only one thing to complain please zoom the screen bigger :'(
@MrYassineSalhi
@MrYassineSalhi 2 жыл бұрын
How would you add react to this? Every time I try their seems to be clashes
@CodeDunks
@CodeDunks 2 жыл бұрын
Hmm this video was mostly focused for backend project setup while React is mostly for frontend.
@kadeinvictus1759
@kadeinvictus1759 3 жыл бұрын
34:23 start: prod uses the "ts-node" and "tsconfig-paths" modules, so in a production environment these modules must be in production dependencies and not in development, right ?
@CodeDunks
@CodeDunks 3 жыл бұрын
ts-node and tsconfig-paths shouldn't be production dependencies. If you look at their docs they install them as dev dependencies. You are correct however if you were to try and take this exact project and run it in production and want to use the yarn start as I have configured. The reason for including those in the start was to fix the MODULE_NOT_FOUND issues for local development when trying to run the yarn start but you are right that it isn't necessarily optimized for production. You can look into this article to possibly improve the project from what I have wrote. bgxcode.com/posts/typescript/ts-absolute-import-paths/
@kadeinvictus1759
@kadeinvictus1759 3 жыл бұрын
@@CodeDunks thank you, I understood and I was able to implement the second method
@KunalMukherjee3701
@KunalMukherjee3701 Жыл бұрын
Record in 1080p
@talhaklaib4016
@talhaklaib4016 3 жыл бұрын
awesome, but please zoom in your screen a little bet
@y_thedreamer95
@y_thedreamer95 2 жыл бұрын
Didn't like the quality at 720p but there is no more videos about it so thanks anyway.
@sumitmajumder8003
@sumitmajumder8003 2 жыл бұрын
fully rubish. code size is very littlebit. I don't see proper code
@CURIOSITYcapital
@CURIOSITYcapital Жыл бұрын
Ohhh shit windows. I can't code on windows too hard. Cmd is a crap. Linux is just better in my opinion
How To Use TypeScript With Express & Node
17:05
Colt Steele
Рет қаралды 68 М.
黑天使遇到什么了?#short #angel #clown
00:34
Super Beauty team
Рет қаралды 40 МЛН
How I Did The SELF BENDING Spoon 😱🥄 #shorts
00:19
Wian
Рет қаралды 35 МЛН
Son ❤️ #shorts by Leisi Show
00:41
Leisi Show
Рет қаралды 10 МЛН
Lehanga 🤣 #comedy #funny
00:31
Micky Makeover
Рет қаралды 28 МЛН
How I Set up Production Node.js Project (2024)
56:26
Alex Rusin
Рет қаралды 2,4 М.
Setup AWS Serverless Project with Typescript Lambda Functions
28:43
Configuring ESLint and Prettier for TypeScript
1:10:32
LogRocket
Рет қаралды 16 М.
Typescript API in NodeJS / Express in Depth [Part 1]
38:10
The Nerdy Canuck
Рет қаралды 7 М.
ESLint with VSCode, Prettier, Husky and React For Beginners
35:03
How to setup Nodejs Express with Typescript
28:20
Mafia Codes
Рет қаралды 17 М.
TypeScript Origins: The Documentary
1:21:36
OfferZen Origins
Рет қаралды 282 М.
黑天使遇到什么了?#short #angel #clown
00:34
Super Beauty team
Рет қаралды 40 МЛН