For further actions, you may consider blocking this person and/or reporting abuse
Read next
Globally Replicated Services for the Rest of Us
Jonas Scholz -
JavaScript Memory Management and Optimization Techniques for Large-Scale Applications
Harish Kumar -
Reliable Notification Systems: Implementing Dead Letter Queues with RabbitMQ and Node.js
Abhinav -
Mastering JavaScript Memory: A Beginner’s Guide to Stack and Heap
chintanonweb -
Top comments (11)
Following a good style-guide
Keeping the code functional and simple
Understanding the difference between arrow function , function with function keyword , a basic understanding of this.
Be aware of the event the node or web environment provide
Avoiding duplicate code as much as possible , even if you feel you are duplicating code try to create a common service and as soon as you done with that remove duplicate code.
Proper Error Handling on priority
Understanding critical points of memory leak
If their are some tasks like cron-jobs if possible run them as a separate micro-service called jobs totally outside of the application scope
Use observables and behaviour subject for handling event change and try to avoid timeout as much as possible
Divide the project into modules and identify the scope of services
Learn aggregation.
Learn about capped and ttl collection
Proper Index Creation is must for giving performance boost
Config must be properly developed
Caching should be learnt on priority and various caching strategy available analysed
Don't block the event loop.
Refactor your code , avoid duplicates and write unit test cases
Learn basics about ec2-instances , remote deployment , linux environment , docker.
Git skills are a must
Learn to create local packages and use them
Learn about creating micro-services
Please try and keep upgrading the node , angular version
MongoDb atlas must be given a try
Thanks a lot @sagar for this awesome guide !!
MongoDb is a real dbms , it's non-relational and have bson based structure , it has support for lookups , aggregation , indexing ( Select , Insert , Update and Delete ) and with latest stream api it now also supports triggers , and the whole benefit of mongo is of not having a fixed structure and it's flexibility. We cannot compare orange and apple and say one is not a fruit based on the other one's definition
thanks @artemix , Since I don't have much experience with RDBMS so can you please share some resource where I can read the code of the project implemented with RDBMS like MySql etc. and can learn from those projects .
I find this quite helpful:
github.com/i0natan/nodebestpractices
It's awesome @Lars
Thanks for sharing.
On the subject of replacing parts of MEAN, also replace Express with Nestjs (it wraps Express under-the-hood, but aligns with your Angular code!)
I tried nestjs , but felt it restricts a user into learning nest and it's pattern, while express gives a user a freehand into understanding nodejs , nest is more like angular styled nodejs which seems very restrictive on the server side and I felt not much of an advantage
While Nestjs is a framework and it does have its own approach to things, you can still interface directly with the underlying express instance.
I suggest exploring dependency injection on your server side, it was the 2nd reason I chose to start with Nestjs (1st again being it aligns so well with my Angular code!)
Thanks @james ,I will definately give it a try .
Thanks a lot @artemix for sharing this resources !!