hello in my case route is defining as follows: 'Loading route: get undefined/healthcheck' do u have an idea why it can be?
@TheNerdyCanuck8 күн бұрын
This means the controller isn't properly giving you back the string inside the function that defines all the routing.
@pdsavard15 күн бұрын
Thanks for the great video. Got a small question, in the Cors Middleware, I can't add the return res.status(200).json({}) without getting a typescript error on the application.use(corsMiddleware). error: No Overload matches this call... Any idea?
@TheNerdyCanuck8 күн бұрын
No overload matches makes me assume the function itself isn't defined properly. Still having this issue?
@pdsavard8 күн бұрын
@@TheNerdyCanuck solved! its because in typescript I can't do return res.status(200)...... something do not like that. I need to set the status then do a "empty" return;
@TheNerdyCanuck8 күн бұрын
@@pdsavard strange, it should let you return but I'm happy you got it to work!
@KrzysztofLuczakPro21 күн бұрын
Great playlist! Can you show how to do auth using decorators?
@TheNerdyCanuck21 күн бұрын
Sure!
@lucascubile714124 күн бұрын
Honestly at this point if you're using typescript you should just go NestJs cause this way of woking with express is just very VERY close to what nest does (as it uses express under the hood) so if you're gonna use express this way just save yourself the trouble and go Nest. Great vid nevertheless
@TheOnlyIchiban27 күн бұрын
This is seriously a fantastic tutorial, i love the in depth explanations on what you're doing and the reasons, it's really important to understand. This was exactly what I needed, awesome work
@SayfSentinelАй бұрын
This way better than a Netflix series
@TheNerdyCanuckАй бұрын
Appreciate that
@govindamishra3746Ай бұрын
Dude uses Javascript Classes in 2024 lmao 🤣 Tell me you use class components in react as well 😂😂😂😂
@TheNerdyCanuckАй бұрын
Decorators can cascade a unlimited amount and reduce rewriting code
@rayrobinsongonzaga9681Ай бұрын
The perfect tutorial I've been looking for! Not just teaching the technologies but most especially best practices, testing, and error handling! Thank you! Make more videos please! Subscribed!
@CiceroRafaelSilvadeOliveiraАй бұрын
Eu entendi porque a informação de usuários online está errada no client, é o seguinte, o dicionário de usuários conectados que temos no servidor é do tipo { [uid: string]: string } onde as chaves são os id's gerados no servidor usando o v4 e os valores são os socket id's. Ao enviar a lista de usuários do servidor para o client nós enviamos os valores do dicionário de usuários conectados, mas quando emitimos o evento 'user_disconnected' nós mandamos o uid do usuário que desconectou, ou seja, mandamos uma chave desse dicionário, só que o client não tem uma lista das chaves, ele tem uma lista dos valores desse dicionário, então quando o client tenta executar a ação 'remove_user' do SocketContext nenhum item da lista é retirado. Para corrigir isso é só trocar 'const users = Object.values(this.users);' por 'const users = Object.keys(this.users);' no arquivo socket.ts do servidor.
@atnguyen-qg6zeАй бұрын
Why can logging be used in handlelogging middleware?
@TheNerdyCanuckАй бұрын
The middleware is designed to add logging to every request instead of using a third party library.
@atnguyen-qg6zeАй бұрын
@@TheNerdyCanuck thanks
@josephboyadjian6965Ай бұрын
Thanks for sharing, I had a question about going into production. Is it really the backend url (https) that needs to be entered in the okta console? thank you.
@TheNerdyCanuckАй бұрын
Okta needs to be able to hit a backend API, so yes. You'll definitely need https for prod
@josephboyadjian6965Ай бұрын
@@TheNerdyCanuck thanks for your response!
@emranghanbari32172 ай бұрын
Which one do you recomend Joi or yup?
@TheNerdyCanuck2 ай бұрын
joi
@fouratzitouni85642 ай бұрын
This is a great series of videos, also I think you’re a great tutor. However I don’t think this is the best way to show people how to do, your application is coupled with mongo which is far from a best practice (n-tiers, clean,…)
@TheNerdyCanuckАй бұрын
It entirely depends on what you are trying to accomplish. "Best Practices" for things like NodeJS and Express come in all shapes and sizes.
@chineduekeneokpala34072 ай бұрын
So i noticed that the class `this` returns undefind, might this due to how the controller decorator was done?
@chineduekeneokpala34072 ай бұрын
const handlers = routes.get(routeNames[k])?.map((item) => { return (req: Request, res: Response, next: NextFunction) => { return item.call(Controller, req, res, next); }, }); Making sure to pass the this(controller in our case)
@TheNerdyCanuckАй бұрын
Which part are you referring to
@asap.bartek2 ай бұрын
How can i handle form-data request? btw great video 👍
@beetpalm2 ай бұрын
best tutors, so clean, i added one decorators/mongoose aggregation.ts try{ const documents = await model.aggregate([...req.body]); req.mongoAggregation = documents } and declareHandler.ts mongoAggregation: Document[]; ... req.mongoAggregation = []; i'm try post body request [ { "$match": { "ecosId":"66978a23a8eb9f44d154914d" } }, { "$project": { "filedata":0 } } ] it work !! It's flexible. i love it. It makes working with Angular very easy and flexible. i'm try MEAN STACK <3
@attaullahsiddiqui39312 ай бұрын
Why are you not making more videos?
@TheNerdyCanuck2 ай бұрын
I would like to make more! I am working on some testing ones right now, it's just hard to justify the time with the kids atm :)
@attaullahsiddiqui39312 ай бұрын
@@TheNerdyCanuck Cool. Plz make more vidoes on NodeJS Angular GraphQL
@RahmadRizkiJadida-3 ай бұрын
we should use React Router Dom and BrowserRouter?
@TheNerdyCanuck2 ай бұрын
Yes!!
@matias.93723 ай бұрын
"Friend, I know it's been a long time since you created this video, but maybe you could help me with an answer. When I use `useSearchParams`, it re-renders my components, which is a problem because I want to create filters based on the params."
@TheNerdyCanuck2 ай бұрын
That's strange. Do you have your code uploaded in git somewhere? I can look at it
@beetpalm3 ай бұрын
i love it, i'm from thailand I'm just starting to learn how to program. I really enjoy your videos.
@aliahmadi88163 ай бұрын
@TheNerdyCanuck Thank you for the content, I get an error if i try to log any of the config variables, I have to import them individually for it to work, what i mean is doing: import './config/config'; console.log(DEVELOPMENT) will throw an error that Cannot find name 'DEVELOPMENT Thank you!
@TheNerdyCanuck3 ай бұрын
Its a setting in the config file to check the NODE_ENV env var
@adm7r3 ай бұрын
great playlist. plus point could be adding auth and protected routes.
@adm7r3 ай бұрын
i'd like to implement it myself. could you just give a brief on how could that be done? should i create another decorator called "Protected"?
@TheNerdyCanuckАй бұрын
What kind of auth do you want to do?
@adm7r3 ай бұрын
"super OCD about my code". ditto. that's why i'm here trying to learn all this, trying to perfect my express backend.
@TheNerdyCanuck8 күн бұрын
I hate how much I overwrite and rewrite code because it's ugly
@JacquesOP3 ай бұрын
Thank you Sir that was exactly what I was looking for. Simple and educative!
@sjorsklaassen30694 ай бұрын
Why do you make the decorator of the mongoose decorators in middleware form? You only showed one really briefly at the end and I want to know why I should or should not make the middleware variants.
@TheNerdyCanuck3 ай бұрын
Middleware vs decorators is a complete prefferrence. I think that decorators are easier to implement / fun :)
@tovileo_4 ай бұрын
How to add a session validation middleware?
@sebastianovalle85814 ай бұрын
Hi, very helpful, do you know why these errors appear, when I use the example TS2339: Property 'defineMetadata' does not exist on type 'typeof Reflect'.
@TheNerdyCanuck3 ай бұрын
I think you need to include reflect-metadata in your main server file or make sure your tsconfig is configured proeprly
@justinwang96605 ай бұрын
thank you. very nice toturial.
@TheKobraIRAQ5 ай бұрын
Your videos are amazing with so much info in short time and you are doing very good job i hope you improve this channel and add more videos about react and nodejs❤thank you very much
@sdawdwadaufyuaiudi21485 ай бұрын
for a new comer Decorators kind da hard for me , is it from nextjs ?
@TheNerdyCanuck3 ай бұрын
Nope, it's a language feature
@lukaslearning35495 ай бұрын
I hope you will cover Jest as well. I tried it before but I got trouble with type-checking inside test files.
@TheNerdyCanuck3 ай бұрын
I am working on some test stuff now
@csguru82115 ай бұрын
Thanks a lot for providing such a quality content
@daz1uk5 ай бұрын
Great video 👍
@jasonterry93435 ай бұрын
Best guide on the net, amazing work. You should do a follow up explaining why some of these patterns are REALLY good, this would help the junior engineers out there a ton.
@muhammadfarhannudin55825 ай бұрын
THANKS YOU MASTER.....
@parsa2645 ай бұрын
thank you, but how to use tailwind or sass for this library?
@gangstacoder42346 ай бұрын
but how do you test while developing a library
@mybackupvideos11036 ай бұрын
lol you didn't explain how to deploy
@EndMan6 ай бұрын
Hello, how can I turn on/off an object using the console? Declare this object in script DeveloperConsole?
@ytarame6 ай бұрын
do you think this could be used to mod multiplayer into a simple game? like just sending the player positions since not many events matters. idk if mirror or unity's netcode will work if its a mod
@johnsanders33806 ай бұрын
Wish you would have showed setting up the saml pem file.... :/
@sivasundarpt6 ай бұрын
Waiting for security implementation parts..........
@TheNerdyCanuck6 ай бұрын
Which part of security friend?
@andresparra58286 ай бұрын
Take your star and your like good man
@piotrszymanski83257 ай бұрын
M8, you are one of the best tutors, nice, clean, no trash talking, perfect tempo, pure and calm voice, and most important - pure essence. I keep fingers corssed for your success as a tutor.
@vivekgowda15767 ай бұрын
Could you please integrate cognito identity for authentication for the same?
@trieunguyentuan45897 ай бұрын
Thanks <3
@tamaniphiri7 ай бұрын
Yessir ❤
@trieunguyentuan45897 ай бұрын
why using package cors. Thanks
@TheNerdyCanuck7 ай бұрын
You can use a package for it for sure, it's probably easier