merged require config with main.js
refactored api-service