
Instead of replacing substrings, write each included file's content into a shared dictionary for lookup later. This eliminates duplication and arguably improves readability.
About the folder structure
- db - all modules that are accesing the data structure and are communicating directly to the database
- handler - all modules that responds directly to requests/messages of the browser
- utils - helper modules
Module name conventions
Module file names starts with a capital letter and uses camelCase
Where does it start?
server.js is started directly