Sunday 28 May 2017

How to Resolve error in tedious

I tried below code.

'use strict';
var http = require('http');
var port = process.env.PORT || XXXX;
var url = require('url');
var Connection = require('tedious').Connection;
var Request = require('tedious').Request;

http.createServer(function (req, res) {
    res.writeHead(200, { 'Content-Type': 'text/plain' });

    var string = '';
    if (req.url == '/') {
        string = 'Hello World\n' + req.url
    }
    else
    {
        string = 'Hello Worlddsddd\n' + req.url
    }

    res.end(string);
}).listen(port);

but,it returned error with message "Unexpected token ILLEGAL".

Illegal error in tedious

Does anyone know how to fix?



via senju_kowloon

No comments:

Post a Comment