change node api to be rest