folder structure for MEAN stack

后端 未结 3 1335
Happy的楠姐
Happy的楠姐 2021-02-10 00:20

I\'m following a tutorial on the MEAN stack and I\'d like to have a clean folder structure to work with. I\'ve read plenty of articles that say to have a folder for each (let\'s

3条回答
  •  情歌与酒
    2021-02-10 00:58

    I had the same problem while I was trying to write MEAN stack. Moreover, I was using my own silly structure.

    - backend
    ------ api
    ----------- controllers
    ----------- middleware
    ----------- models
    ----------- routes
    ------ node_modules
    ------ app.js / package.json - package-lock.json / server.js
    
    - frontend 
    ----------- angular components
    

    I did research for a while. I found this link very useful, and I am following the structure where shown on the link.

    - app               
    ----- models
    ---------- todo.js  
    ----- routes.js     
    
    - config            
    ----- database.js
    
    - public            
    ----- core.js       
    ----- index.html    
    
    - package.json      
    - server.js         
    

提交回复
热议问题