T3060
Refactor to support unit testing of API endpoints.
Following express documentation and mochajs example at https://github.com/mochajs/mocha-examples/tree/master/packages/express-rest-api
Remove the express app from main.js. Refactor index.js so that the app initializes the db first before passing this to the express server and the indexer.
Add unit test for existing API endpoint.