update server.dart to simulate web.py