use express 4 router and move node.js scripts to lib