Measuring the neutron-star equation of state with GW170817