example/server: small refactor