Step 4 – configure the Media Catalogue Microservice

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:

  1. 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 ...

Get Implementing Oracle API Platform Cloud Service now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.