server implementation based on werkzeug