refactor api code to use nodejs as webserver, tomcat as application server