rewrites api server using express 4.x, added package archive repo functionality