reading-nots

View the Project on GitHub

Heroku :

Heroku is a cloud platform that lets companies build, deliver, monitor and scale apps — we’re the fastest way to go from idea to URL, bypassing all those infrastructure headaches. It allows you to deploy your web server, so everyone could see how awesome you are as a web developer. First of all, you need to create an account on developer’s site and install Heroku Node.js

var http = require(“http”); var fs = require(“fs”); var path = require(“path”); var mime = require(“mime”); The first one will give you the key to Node’s HTTP functionality. The second one is for possibility to interact with the file system. The third one allows you to handle file paths. The last one allows you to determine a file’s MIME-type. And it’s not a part of Node.js, so we need to install third-party dependencies before using it. We need to create the package.json file for that purpose. It will contain project related information, such as name, version, description, and so on. For our project we will use MIME-types recognition, because it’s not enough to just send the contents of a file when you use HTTP. You also need to set the Content-Type header with proper MIME-type. That’s why we need this plug-in.

img