Тёмный

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

CoderOne
Подписаться 109 тыс.
Просмотров 32 тыс.
50% 1

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 44   
@theyioel
@theyioel 4 месяца назад
These tips can be applied in general, not just Express. Thanks for your time. Honorable mention to Flask.
@fikriahmadfauzi-eb8sj
@fikriahmadfauzi-eb8sj Год назад
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
@emee__
@emee__ Год назад
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 Год назад
Why do you need express to use in Next js, in api route, you can do the backend stuff without express
@emee__
@emee__ Год назад
@@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
@spastheghost
@spastheghost Год назад
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.
@yamilmsilva
@yamilmsilva 9 месяцев назад
THANK YOU SO0 MUCH BUIDDY !!!!!! VERY VERY important !!!!1
@mohammadjawad5085
@mohammadjawad5085 Год назад
Merci
@Maks-fc7kv
@Maks-fc7kv 11 месяцев назад
Actually in this case there is only 1 mistake - using such a ****** like express.
@miauw8762
@miauw8762 8 месяцев назад
Salty
@CodingGarden
@CodingGarden 2 месяца назад
😄
@axelandru9346
@axelandru9346 9 месяцев назад
Thanks for valuable insights into server security !!!
@codewithahk
@codewithahk 20 дней назад
Say A Bottle of water🤣
@gamingwolf3385
@gamingwolf3385 Год назад
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 Год назад
error.message also works fine
@zlackbiro
@zlackbiro Год назад
Professionals use ZOD for validation!!!
@SkySentry7
@SkySentry7 7 месяцев назад
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
@giahuyo4023
@giahuyo4023 Месяц назад
what is theme color you are using bro
@-ajrego-4869
@-ajrego-4869 Месяц назад
ayu mirage i think
@muhammadarsallanshahab6760
@muhammadarsallanshahab6760 Год назад
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
@jamestacular
@jamestacular 3 месяца назад
After adding the errorHandler middleware your "bad" route is still going to get caught in the error middleware
@logicalimmanuel2357
@logicalimmanuel2357 2 месяца назад
thx, concise but pretty informative.
@adamnauka7803
@adamnauka7803 Год назад
const statusCode = res.statusCode !== 200 ? res.statusCode : 500 I don't get this line, if 200 we assign 500? Can you expalin?
@mikedev4673
@mikedev4673 Год назад
Good catch, its a bug
@internetexplorer7880
@internetexplorer7880 Год назад
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 Год назад
@@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 Год назад
​@@mikedev4673 I think the same. Anyway maybe it would be better to call always 500 in case of error?
@SkySentry7
@SkySentry7 7 месяцев назад
@@internetexplorer7880exactly.. now i get it
@aymenbachiri-yh2hd
@aymenbachiri-yh2hd 4 месяца назад
Thanks , keep posting content like this
@lop3242
@lop3242 4 месяца назад
clear and valuable !! thanks a lot
@daphenomenalz4100
@daphenomenalz4100 7 месяцев назад
Zod is better imo tho for validation 👀
@seghirissam2662
@seghirissam2662 7 месяцев назад
Which theme do you use in vscode ?
@hasithadhananjaya2806
@hasithadhananjaya2806 3 месяца назад
Valuable stuff 🎉❤
@mudziahutama7787
@mudziahutama7787 Год назад
Good explanation Sir! What is the kind of color theme VSCode btw?
@rishiraj2548
@rishiraj2548 Год назад
Good day greetings
@imfad3d
@imfad3d Год назад
This is really very useful.
@yashinox5410
@yashinox5410 Год назад
Only NestJS ❤❤
@gamingwolf3385
@gamingwolf3385 Год назад
Nestjs is better than express but it has less community , less tutorials
@nishaindesilva3738
@nishaindesilva3738 Год назад
Is there is nestJs ? I always thought its was spelling mistake for nextJs
@yashinox5410
@yashinox5410 Год назад
If you like a OOP you should try it.
@coder_one
@coder_one 10 месяцев назад
​@@yashinox5410OOP in JS sucks...
Далее
"Когти льва" Анатолий МАЛЕЦ
53:01
How to handle Node.js errors like a Pro?
12:44
Просмотров 30 тыс.
Why aren't you using Fastify? Or Koa? Or NestJS?
9:58
I Stopped Using Express.js: Because Bun and Hono 🔥
10:23
The Most Legendary Programmers Of All Time
11:49
Просмотров 566 тыс.
Node.js is a serious thing now… (2023)
8:18
Просмотров 650 тыс.