added path to database in index.js, changed directories for templates file and added directory lib