Spaces:
Sleeping
Sleeping
Update index.js
Browse files
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 |
-
|
|
|
|
| 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);
|