1

I have been reading the 'Node JS Best Practices' Github article. One point that I I found interesting was the very first best practice. Here they split up the project structure based on components. One of the advises was to use functions and classes outside the component by defining them in an API class. But I can't find any examples on how such class should be build.

This is the link to the Github article: Component bases project structure

Stephen
  • 913
  • 3
  • 24
  • 50

2 Answers2

0

You Just Connect Your Main Index file . every script File Then AutoLoad Practices.

Var myVar2 = require('./your_file') 
Ryihan
  • 1
  • 4
0

You can have a look at this, if you wanna structure your project in different parts and make that more readable.

Im attaching one of the boilerplate link of github since, it will be huge to tell you everything here, just look at this setup you will know everything.

check this link for boilerplate.

If you have doubts let me know.

Ashishssoni
  • 729
  • 4
  • 14