Production Environment

Overview

We almost always will have different a different configuration for our production deployment of an app than we will for our local development. In this section we setup our application to have different configurations based one the NODE_ENV environment variable.

Prerequisites

Production Configuration

For more details on how loopback uses different configurations you can see Loopback 3 Docs

Your datasources.local.js should look something like below:

In the server folder create a new file name datasources.production.js and then copy and paste in your code from datasources.local.js

Last updated