Express JS Mistakes Every Junior Developer should Avoid | clean-code

  Рет қаралды 21,902

CoderOne

CoderOne

Күн бұрын

If you're an Express.js beginner or just getting started with it, then you're probably doing a lot of things wrong. In this video, we'll explore Junior Express JS Mistakes you should avoid writing better and cleaner code.
🎉Our Newsletter is here! Join thousands of other developers
islemmaboud.com/join-newsletter
⭐ Timestamps ⭐
00:00 Intro
00:51 1) Error Handling
05:08 2) Validation
09:02 3) Environment Variables
12:01 4) API Versioning
13:43 5) Security
-- Special Links
✨ Join Figma for Free and start designing now!
psxid.figma.com/69wr7zzb1mxm
👉 ✨ Join Figma For Professionals And Start Designing with your Team ✨
psxid.figma.com/ucwkx28d18fo-...
🧭 Build Login/Register API Server w/ Authentication | JWT Express AUTH using Passport.JS and Sequelize
• Build Login/Register A...
🧭 Turn Design into React Code | From prototype to Full website in no time
• Turn Design into React...
🧭 Watch Tutorial on Designing the website on Figma
• I Design a onecolor We...
🧭 Watch Create a Modern React Login/Register Form with Smooth Animations
• Create a Modern React ...
🧭 Debug React Apps Like a Pro | Master Debugging from Zero to Hero with Chrome DevTools
• Debug React Apps Like ...
🧭 Master React Like Pro w/ Redux, Typescript, and GraphQL | Beginner to Advanced in React
• Master React Like Pro ...
🧭 Learn Redux For Beginners | React Redux from Zero To Hero to build a real-world app
• Debug React Apps Like ...
🧭 Introduction to GraphQL with Apollo and React
• Introduction to GraphQ...
👉 Personal Links:
✨ My Portfolio islemmaboud.com
🐦 Follow me on Twitter: / ipenywis
💻 GitHub Profile github.com/ipenywis
Made with ❤️ by Coderone

Пікірлер: 36
@axelandru9346
@axelandru9346 5 ай бұрын
Thanks for valuable insights into server security !!!
@theyioel
@theyioel 29 күн бұрын
These tips can be applied in general, not just Express. Thanks for your time. Honorable mention to Flask.
@lop3242
@lop3242 5 күн бұрын
clear and valuable !! thanks a lot
@spastheghost
@spastheghost 10 ай бұрын
Good one but I don't see a link to the CORS video. It would be helpful for future watchers if you add it to the description.
@imfad3d
@imfad3d 10 ай бұрын
This is really very useful.
@mudziahutama7787
@mudziahutama7787 10 ай бұрын
Good explanation Sir! What is the kind of color theme VSCode btw?
@yamilmsilva
@yamilmsilva 5 ай бұрын
THANK YOU SO0 MUCH BUIDDY !!!!!! VERY VERY important !!!!1
@aymenbachiri-yh2hd
@aymenbachiri-yh2hd 13 күн бұрын
Thanks , keep posting content like this
@fikriahmadfauzi-eb8sj
@fikriahmadfauzi-eb8sj 10 ай бұрын
i want to ask, about the error handling, if its a async function, how to handle it? because the middleware seems cant handle that with throw
@gamingwolf3385
@gamingwolf3385 10 ай бұрын
In the part of error handling you can extract the name and code of the erro const {name,code}=error This will help in writing better custom error messages
@akashambrose
@akashambrose 10 ай бұрын
error.message also works fine
@seghirissam2662
@seghirissam2662 3 ай бұрын
Which theme do you use in vscode ?
@mohammadjawad5085
@mohammadjawad5085 10 ай бұрын
Merci
@emee__
@emee__ 10 ай бұрын
Bro I know this might seem selfish to ask, but can you make a video on how to migrate express to next js or at the very least how to use express with next js.
@naimurrahman9979
@naimurrahman9979 10 ай бұрын
Why do you need express to use in Next js, in api route, you can do the backend stuff without express
@emee__
@emee__ 10 ай бұрын
@@naimurrahman9979 Most of my application business logic code is already in express. Am contemplating using react with next or ejs for the frontend for ssr
@rishiraj2548
@rishiraj2548 10 ай бұрын
Good day greetings
@daphenomenalz4100
@daphenomenalz4100 3 ай бұрын
Zod is better imo tho for validation 👀
@muhammadarsallanshahab6760
@muhammadarsallanshahab6760 9 ай бұрын
Brother i think there is a issue with your Mic i can't watch your video full because it hurts my ear the Mic sound sounds just like scratching in board with nails. I do want to watch the video but my ears just can't handle the mic sound
@zlackbiro
@zlackbiro 10 ай бұрын
Professionals use ZOD for validation!!!
@SkySentry7
@SkySentry7 3 ай бұрын
Zod is a great choice if you're looking for a simple and performant validation library that can handle basic validation scenarios. Joi is a good choice if you need a highly customizable validation library that can handle complex validation scenarios
@yashinox5410
@yashinox5410 10 ай бұрын
Only NestJS ❤❤
@gamingwolf3385
@gamingwolf3385 10 ай бұрын
Nestjs is better than express but it has less community , less tutorials
@nishaindesilva3738
@nishaindesilva3738 10 ай бұрын
Is there is nestJs ? I always thought its was spelling mistake for nextJs
@yashinox5410
@yashinox5410 10 ай бұрын
If you like a OOP you should try it.
@coder_one
@coder_one 6 ай бұрын
​@@yashinox5410OOP in JS sucks...
@Maks-fc7kv
@Maks-fc7kv 7 ай бұрын
Actually in this case there is only 1 mistake - using such a ****** like express.
@miauw8762
@miauw8762 4 ай бұрын
Salty
@adamnauka7803
@adamnauka7803 10 ай бұрын
const statusCode = res.statusCode !== 200 ? res.statusCode : 500 I don't get this line, if 200 we assign 500? Can you expalin?
@mikedev4673
@mikedev4673 10 ай бұрын
Good catch, its a bug
@internetexplorer7880
@internetexplorer7880 10 ай бұрын
When you throw an error you should not send a 200 statuscode to the client so if there's any scenario where res.status is 200 during an error, it will default it to 500
@mikedev4673
@mikedev4673 10 ай бұрын
@@internetexplorer7880by your logic this line doesn’t make sense if the status code is 201 it will send 201 and 3** will send 3** which it used for redirects and so on.
@adamnauka7803
@adamnauka7803 10 ай бұрын
​@@mikedev4673 I think the same. Anyway maybe it would be better to call always 500 in case of error?
@SkySentry7
@SkySentry7 3 ай бұрын
@@internetexplorer7880exactly.. now i get it
NO NO NO YES! (50 MLN SUBSCRIBERS CHALLENGE!) #shorts
00:26
PANDA BOI
Рет қаралды 102 МЛН
Black Magic 🪄 by Petkit Pura Max #cat #cats
00:38
Sonyakisa8 TT
Рет қаралды 17 МЛН
Would you like a delicious big mooncake? #shorts#Mooncake #China #Chinesefood
00:30
КАХА и Джин 2
00:36
К-Media
Рет қаралды 4 МЛН
How to handle Node.js errors like a Pro?
12:44
Software Developer Diaries
Рет қаралды 21 М.
Express JS #15 - Passport.js Authentication
37:41
Anson the Developer
Рет қаралды 6 М.
I Stopped Using Express.js: Because Bun and Hono 🔥
10:23
Sam Meech-Ward
Рет қаралды 100 М.
Node.js Project Structure and Architecture Best Practices
7:38
Software Developer Diaries
Рет қаралды 20 М.
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 449 М.
Error Handling in NodeJS (Complete Guide) | Node Tutorial
17:54
Nikita Dev
Рет қаралды 38 М.
Advanced Node.js Crash Course | New Year Gift!
2:45:01
Mehul - Codedamn
Рет қаралды 132 М.
All useEffect Mistakes Every Junior React Developer Makes
22:23
NO NO NO YES! (50 MLN SUBSCRIBERS CHALLENGE!) #shorts
00:26
PANDA BOI
Рет қаралды 102 МЛН