added server.js and moved index.thml into templates.