Skip to content

Commit

Permalink
Really final!!
Browse files Browse the repository at this point in the history
yeah!
  • Loading branch information
junhoyeo committed Feb 6, 2018
1 parent 8f15b30 commit 22c221a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions helloWorld.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//JavaScript를 배우고 싶어져서 소마센터에 있던 책에 써있던 예제코드를 실행해 본 것
var http = require('http');
http.createServer(function(req, res){
var path=req.url.replace(/\/?(?:\?.*)?$/, '').toLowerCase();
switch(path){
case '':
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello, 0XD happckathon 2018!');
break;
case '/about':
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('About');
break;
default:
res.writeHead(404, {'Content-Type': 'text/plain'});
res.end('Not Found :(');
break;
}
}).listen(3000);
console.log('Server started on localhost:3000; press Ctrl+C to terminate');
//파일 저장 안 해놓고 서버가 안 열려서 당황했던 기억이...
2 changes: 2 additions & 0 deletions images/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# 무엇?
이미지 파일을 모아놓은 디렉토리입니다!
2 changes: 2 additions & 0 deletions rss/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# 여긴 또 무엇?
리소스 파일을 모아놓은 디렉토리입니다!

0 comments on commit 22c221a

Please sign in to comment.