In our node js application, all api calls are in server.js. Its a working application, but I'm not happy with every api written in one file i.e. server.js. Many of the examples related to node js application, point to writing server side calls in one file named app.js or server.js. To achieve code modularity, I'm planning to separate the api's in different files like employee.js (employee related data transaction), library.js (library related data transaction) and so on to respective modules. Not sure whether this is the right approach as node.js server needs to be launched on application invoke. So, if the api's are distributed to different files then need to check how to launch the node js server in one shot.
Also, we have integrated node-webkit with the application.
Need suggestions in this regard.