var http = require('http');
var fs = require('fs');
var url = require('url');
var app = http.createServer(function(request,response){
var _url = request.url;
const myURL = new URL('http://localhost:3000'+_url);
var queryData = myURL.searchParams.get('id');
if(!queryData) {
queryData = undefined;
}
if(_url == '/'){
_url = '/index.html';
}
if(_url == '/favicon.ico'){
return response.writeHead(404);
}
response.writeHead(200);
response.end(queryData);
});
app.listen(3000);