A simple nodejs application with MVC and API

suggest change
|-- Config
       |-- config.json
       |-- appConfig
           |-- pets.config
           |-- payment.config

You can choose different names for server or webapp, depending on what makes sense for you. Don't make the name too long or too complex, because this is internal project structure.

|-- server
     |-- dto
         |-- pet.js
         |-- payment.js
     |-- controller
         |-- PetsController.js
         |-- PaymentController.js
     |-- App.js
|-- webapp
    |-- public
    |-- mvc
|-- public 
    |-- build  // will contain minified scripts (mvc)
    |-- images
        |-- mouse.jpg
        |-- cat.jpg
    |-- styles
        |-- style.css
    |-- views
        |-- petStore.html
        |-- paymentGateway.html
        |-- header.html
        |-- footer.html
    |-- index.html
|-- mvc
    |-- controllers
        |-- Dashboard.js
        |-- Help.js
        |-- Login.js
    |-- utils
    |-- index.js

In conclusion, the entire project structure will look like the tree below. A simple build task such as gulp browserify will minify the MVC scripts and publish them in the public directory. That directory can then be served as a static resource with express.use(express.static('public')).

|-- node_modules
|-- src
    |-- server
        |-- controller
        |-- App.js   // node app
    |-- webapp
        |-- public
            |-- styles
            |-- images
            |-- index.html
        |-- mvc
            |-- controller
            |-- shell.js  // mvc shell
|-- config
|-- Readme.md
|-- .gitignore
|-- package.json

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents