So, I felt pretty much lost in building the app, essentially because I don’t quite understand why all the people are making more than one .js file - app.js, timestamp.js, router.js etc, and, more embarassing, I don’t understand the code they made… Since it was hard for me to grasp the philosophy behind that, I decided to just try and make it work, and after I’m done with the first working version, I could ask for help.
These are my GitHub repository and Heroku app:
Please feel free to look at it, it seems to be working…
What’s more important - could anyone explain why should I make multiple .js files instead of one for this project - what’s the benefit? Also, if someone would be so kind and explain me what would it look like if my server.js was separated into two or more files - I think I still don’t understand the concept, or the “big picture” behind all this… All in all, an example (simpler - better) and an explanation would be fantastic.