Created HTTP server and added functionality to main.js