fixed module.exports style in api.js