Nodejs is a powerful tool for building fast and scalable web applications. However, to get most out to nodejs it is important to follow best practi...
For further actions, you may consider blocking this person and/or reporting abuse
Adding logging to a Node.js application is essential for gaining insights and troubleshooting issues effectively. By following best practices in logging, developers can ensure they capture real problems and improve the overall reliability and performance of the application.
You are absolutely right. Adding logging is another key best practice. Thank you for this.
This is awesome! A little spoiler. The same way we have create-react-app for frontend there is this framework for backend called suite that follows this structure. Suite helps you scaffold a project with suite generate command with the initial server listening at port 9001. You may try it out with
npm install @microservices-suite/cli -g
. Or checkit out here npmjs.com/package/@microservices-s...Error handling is key just as logging was suggested. From the snippet on error handling I'd suggest that the error not me hidden ... Handle each error gracefully.. it would be best when one implements different error cases.. not found, forbidden, unauthorized or token or jwt expire errors, etc,
yeah your are right implementing different error cases is good practice too. I just wanted to keep things simple here. Thanks for mentioning it
NGL, i wish i read this three years ago when i started developing with JS
Glad to share @jyoung4242
Great tips!
I would also add few more like:
Yeah these are good tips too. Thank you for sharing
For all Javascript framework we have created the simpliest KPI tracker, with just one-lince code of setup. We are even opensource, give it a try.
Open-Source Git Repo -- Leave a ✨ if you like!
A. CEO & Founder at Litlyx
Hey Antonio I will check it later
I would love it for real! Thanks my man, keep up the goo work!
Love the tips. Thanks man
Welcome
Excellent 👌👍, May Allah Bless You.
I'll try to follow these tips, bcz I'm interested in Back-End Development.
May Allah bless you too and best of luck on your back-end journey.
Are you a Back-End developer? Please guide me from start to market/industry...!
I am a beginner in nodejs and yours advice really helps and now I know how to set up my project dev environment cleanly. Thanks very much
My pleasure. @tharcissentirandekura
Nice article
Hi @sharmi2020 , Thank your very much for your feedback
Thanks for the tips 😀
You are most welcome.
nice article.
why is it that when it comes to writing tests, the sum example is used. What has testing sum got to do with Nodejs server.
The main focus here is how you can setup jest and test a certain block/function with it.
I used the sum example because just to keep it simple and clean in order that beginners can understand it easily . Thanks btw
Can I have the same guide but on the structure of the typescript project and the necessary libraries? Thank you👍
Yes, you can follow the same guide on the structure of typescript project and the necessary libraries.
** This Guide is an outstanding resource for professionals and developers. It offers a thorough and well-organized exploration of the subject, starting with foundational concepts.**
Thank you @patadiarushabh
That’s nice thanks for that
I’m open to a Frontend internship role
Please reach out to me if you have an opening
I am sorry I don't have an opening rn
The code is clean and understandable..
@omiscom Thanks for your feedback