ADD: add template.js and modify config.js and routes.js