Implement backend as a hybrid web service/npm module