revise routing order: process static resources request first
move db.js logging.js logging.json to lib dir and update related references