Hello. I’m getting data from an API and writing it to a database, and I’m serving up a webpage that displays the data in various forms.
I’m using Node.js, Express, and Mongoose.
At the moment, I’ve got one back-end file, server.js, that does everything. I want to split the reading and writing, so that I can let the database continue to grow while I fiddle with the other functionality.
I’m sure there’s a standard approach for doing this, but I’m not sure what to Google! Do I just set up two separate projects that deal with the same database, with two server.js files to run independently? Can you set up the same schemas in each without causing problems?