revamp server, add GET+POST /edges, add related tests