add option to pass locals to server module