Improved node configuration code with promises