Refactoring port to config.js