rearranged functions
moved to node server

was previouly using apache
updated for tests