31Jan

Let’s start from SOLID principles to get the basic understanding of this stuff. There are 5 principles: – Single responsibility; – Open-closed; – Liskov substitution; – Interface segregation; – Dependency inversion;

Subscribe to our channels!
Youtube
Facebook
Twitter
LinkedIn
Instagram
Google +

We are looking forward to meeting you on our website soshace.com

19. Node.js Lessons. Safe Way to a FS File and Path

This article will deal with how to create a web server in Node.js, which will return a file to a user from a public directory. You may wonder: why do we need Node.js here? Why can’t we use another server? You question surely does make sense. Yes, for returning files other servers are generally more effective. From the other side, Node.js works pretty well, too. Second, before returning a file it can also perform some intellectual activities: for example, refer to a database, check out whether a user is permitted to access the file and give the file to him, if it’s permitted.

Leave a Reply