I want to split the code into different files. I currently write all get
and post
methods in the same file, but I want greater readability and manageability.
I've tried to put the code in different files, but while running the main app, the rest of get
and post
methods in other files are not able to called.
I include this:
var Db = require('/filename.js'); // ...but I can't call those methods.
I want to split my single file code for readability. How do I achieve this?