Update api.js

updated morgan logger.