port apache stuff to express framework