Application Integration

ArrowDB Connector Dev & Production Environments

When you create an API Builder project you will find that the ArrowDB Connector is installed in your project. If you don’t find it already installed, you can always install it from the command line using the following command:

appc install connector/appc.arrowdb

Behind the scenes, when you created the API Builder project, an ArrowDB noSQL Database was created for you to store and retrieve data from. In fact, two databases are created, one for development and one for production. This is useful for developers that need separate dev and prod databases.

When you are developing and running your API Builder project (i.e. appc run) you are using your development database. When you publish (i.e. appc publish), you are using your production database.

If you look in the /conf folder of your project you will see two ArrowDB connector configuration files:

  • appc.arrowdb.development.js
  • appc.arrowdb.production.js

This is how API Builder knows which ArrowDB to use during development and during production.

However, if you are building a demo or a proof of concept, you may not care about two different environments and databases. In fact, it can get tedious to populate data in two places as you are developing and publishing your API Builder app.

The fix for this is easy:

  • Save the two ArrowDB Connector configuration files for backup
  • Delete one of the ArrowDB Connector configuration files (e.g. appc.arrowdb.development.js)
  • Rename the remaining ArrowDB Connector configuration file (e.g. appc.arrowdb.production.js) to appc.arrowdb.js
  • Your API Builder project will now use the same ArrowDB for both development and production

This is depicted below in the before and after screenshots:

BEFORE

ArrowDB Connector Dev & Production

AFTER

ArrowDB Connector Dev & Production