index.js
/**
 * load any file requested on the server
 * @param {express.req} req - the inbound request object from the client
 * @param {express.res} res - the outbound response object for communicating back to client
 * @function
 */
load any file requested on the server
@param {express.req} req - the inbound request object from the client
@param {express.res} res - the outbound response object for communicating back to client
@function
load any file requested on the server @param { express . req } req - the inbound request object from the client @param { express . res } res - the outbound response object for communicating back to client @function
function loadSelectedFile(req, res) {
    var uri = req.originalUrl;
    var filename = __dirname + "/HTML" + uri;
    fs.readFile(filename,
        function(err, data) {
            if (err) {
                console.log('Error loading ' + filename + ' error: ' + err);
                return res.status(500).send('Error loading ' + filename);
            }
            var type = mime.lookup(filename);
           res.setHeader('content-type', type);
            res.writeHead(200);
            res.end(data);
        });
}
function loadSelectedFile ( req , res ) { var uri = req . originalUrl ; var filename = __dirname + "/HTML" + uri ; fs . readFile ( filename , function ( err , data ) { if ( err ) { console . log ( 'Error loading ' + filename + ' error: ' + err ) ; return res . status ( 500 ) . send ( 'Error loading ' + filename ) ; } var type = mime . lookup ( filename ) ; res . setHeader ( 'content-type' , type ) ; res . writeHead ( 200 ) ; res . end ( data ) ; } ) ; }
load any file requested on the server
 @param {express.req} req - the inbound request object from the client
 @param {express.res} res - the outbound response object for communicating back to client
 @function
load any file requested on the server @param { express . req } req - the inbound request object from the client @param { express . res } res - the outbound response object for communicating back to client @function