adds basic middleware and runs server