Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27b05ff commit 828a499Copy full SHA for 828a499
week1/homework/src/server.js
@@ -14,6 +14,9 @@ function createServer(port) {
14
const server = http.createServer((request, response) => {
15
console.log(request.method, request.url);
16
switch (request.url){
17
+ case '/':
18
+ response.writeHead(200, {'Content-Type': 'text/html'});
19
+ response.end('<!doctype html><html><head></head><body>Hello Hack Your Future</body></html>');
20
case '/state':
21
response.writeHead(200, {'Content-Type': 'application/json'});
22
response.end(JSON.stringify( {state: state}));
@@ -54,4 +57,3 @@ module.exports = {
54
57
55
58
56
59
-
0 commit comments