sane way to handle config, both php and javscript