generic configuration setup in js