Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Folder Structure

No folder structure is enforced for Node.js modules, but many developers use a common pattern that you may want to adhere to. If you choose to use the folder structure suggested below, just use the folders relevant to your project. So, if you don’t have any documentation, do not use the doc folder! You may also want to add additional folders or files depending on the complexity of your project. For a very small library, you may want to not use any folders at all and place the code for your module in a single index.js file. It is up to you to choose the best approach, but bear in mind that if you are working with other developers, following some kind of convention makes it easier for them to develop with you. A suggested folder structure is as follows:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint