generate config.js according the enviroment.