1

I found the following structure as kind of standard for nodejs programs from this post:

- myApp
    - app.js
    - models
    - views
    - controllers(routes)
    - public

But when I create my own custom package in nodejs via "mean package myApp". The meanio will create a slightly different structure:

- myApp
    -app.js
    - server
        - models
        - views
        - controllers
        - routes
        - config
    - public

in which app.js is not located in the same dir as models and routes. Is there any significant difference between these two structure?

Community
  • 1
  • 1
Mohammadreza
  • 450
  • 2
  • 4
  • 14

1 Answers1

0

Directory structure is nothing but the matter of preference, you can use any directory structure of your choice. There is nothing like a standard structure for NodeJs apps.
If MeanIO create such a directory structure for you, you should probably go with it, unless you prefer some other structure.

Naeem Shaikh
  • 15,331
  • 6
  • 50
  • 88