freealise commited on
Commit
ab6c4ff
·
verified ·
1 Parent(s): 89a0826

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +3 -1
index.js CHANGED
@@ -1,6 +1,8 @@
1
  const http = require('http');
 
2
 
3
  http.createServer(function (req, res) {
4
  res.writeHead(200, {'Content-Type': 'text/html'});
5
- res.end('Hello World!');
 
6
  }).listen(8080);
 
1
  const http = require('http');
2
+ const url = require('url');
3
 
4
  http.createServer(function (req, res) {
5
  res.writeHead(200, {'Content-Type': 'text/html'});
6
+ var q = url.parse(req.url, true);
7
+ res.end(q.query);
8
  }).listen(8080);