Implemented my spruce view and its function in app.js