File structure
See original GitHub issueHey I was just curious what a good file structure would be for use with Studio and an Express API. I’m thinking something like this:
- services
- config-service.js
- user-module
- index.js
- create-service.js
- update-service.js
- remove-service.js
- auth-module
- index.js
- signup-service.js
- login-service.js
- api
- user-routes
- index.js
- create-route.js
- update-route.js
- etc.
- app
- index.js
Under the services folder, they are group by Studio module’s if appropriate, or just standalone files if the service doesn’t need a module. Then each api route would have its own file, which would then require its associated service.
Thoughts? Also, what have you guys done?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
File Structure : Broad Institute of MIT and Harvard
File structures are not fixed entities, but rather build a framework that communicates the function and purpose of elements within a project by...
Read more >5 Tips To Create An Organized File Structure Like A Pro
One folder structure best practice is to avoid having folders that compete with one another. Try not to create folders with overlapping ...
Read more >Programming 101: File Structures - Medium
Generally speaking, a file structure is how you organize information on your computer. Regarding programming, the Broad Institute of MIT and Harvard ...
Read more >file structure - SAA Dictionary
file structure. n.The manner in which data and other objects are organized within a file.The manner in which files are organized in a...
Read more >Understanding File Structure | Computerworld
Understanding file structure. is helpful when transferring multiple HTML and graphics files to your. server and when referencing these files in your code....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh, thx i will add it tonight. Anyway you can see it here: https://medium.com/adopting-microservices-architecture/nodejs-microservices-from-zero-to-hero-pt2-72fbb2a1b1c4#.dahyaklx5
(I will keep the issue open for a while if anyone wants to comment something on this )
Something like this (attaching this, because i only have my company code, so i prefer to avoid printing it) , on express.js i initialize express to use on the routes