API 3.0 comes with various performance and flexibility enhancements, some of which introduce breaking changes. This document is an overview of the changes that are required to make your application ready for the upgrade.
Configuring a database and data connector
Whilst API 2.0 requires a MongoDB database to run, version 3.0 is capable of working with virtually any database engine, as long as there is a data connector module for it.
When migrating from 2.0, we need to explicitly specify MongoDB as our database engine by adding @dadi/api-mongodb as a project dependency:
$ npm install @dadi/api-mongodb --saveAPI requires each data connector to have its own configuration file located in the same directory as API's main configuration files. Just like API, you'll need one for each environment you run the application in.
For example, if you currently have a config.development.json and config.production.json configuration files, you'll need to place mongodb.development.json and mongodb.production.json in the same directory.
Tutorials
Last Updated:
September 2019

