server.py: dev and prod modes in same code