Engineering whole-cell biosensors to evaluate the effect of osmotic conditions on bacteria