Before coding the main functionality, let's create a simple hello world message to structure the Media Catalogue Microservice as per the four layers explained in the previous step. The first step is to create the folders and files required, as shown in the following diagram:
- Open the config.js file and update to include the port number and database URL as an environment property, as shown in the following code block:
module.exports = { server: { port: process.env.PORT || 3000 }, db: { connectString: process.env.MONGODB_URI || "mongodb://localhost:27017/catalogue_db" } };
The port is inherited ...