[PIE-5] Change api class to work with Hapi.js

Each API instance is a valid Hapi plugin. registering the plugin loads
all registered routes to the server