Minjae1239

app.js updated

Showing 1 changed file with 56 additions and 28 deletions
......@@ -25,89 +25,117 @@ var kt = firstWsheet['P11'];
app.get('/',function(req,res){
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./index.html").pipe(res);
fs.createReadStream("./html/index.html").pipe(res);
})
app.get('/info',function(req,res){
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/info.html").pipe(res);
})
app.get('/vs',function(req,res){
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/vs.html").pipe(res);
})
app.get('/vs_lg',function(req,res){
app.get('/vs/lg',function(req,res){
if(lotte.v>lg.v){
res.send('Lotte VS LG : Lotte Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/lg_l.html").pipe(res);
}
else{
res.send('Lotte VS LG : LG Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/lg_w.html").pipe(res);
}
})
app.get('/vs_kia',function(req,res){
app.get('/vs/kia',function(req,res){
if(lotte.v>kia.v){
res.send('Lotte VS Kia : Lotte Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/kia_l.html").pipe(res);
}
else{
res.send('Lotte VS Kia : Kia Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/kia_w.html").pipe(res);
}
})
app.get('/vs_sk',function(req,res){
app.get('/vs/sk',function(req,res){
if(lotte.v>sk.v){
res.send('Lotte VS SK : Lotte Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/sk_l.html").pipe(res);
}
else{
res.send('Lotte VS SK : SK Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/sk_w.html").pipe(res);
}
})
app.get('/vs_hanhwa',function(req,res){
app.get('/vs/hanhwa',function(req,res){
if(lotte.v>hanhwa.v){
res.send('Lotte VS Hanhwa : Lotte Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/hanhwa_l.html").pipe(res);
}
else{
res.send('Lotte VS Hanhwa : HanHwa Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/hanhwa_w.html").pipe(res);
}
})
app.get('/vs_nc',function(req,res){
app.get('/vs/nc',function(req,res){
if(lotte.v>nc.v){
res.send('Lotte VS NC : Lotte Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/nc_l.html").pipe(res);
}
else{
res.send('Lotte VS NC : NC Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/nc_w.html").pipe(res);
}
})
app.get('/vs_doosan',function(req,res){
app.get('/vs/doosan',function(req,res){
if(lotte.v>doosan.v){
res.send('Lotte VS Doosan : Lotte Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/doosan_l.html").pipe(res);
}
else{
res.send('Lotte VS Doosan : Doosan Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/doosan_w.html").pipe(res);
}
})
app.get('/vs_samsung',function(req,res){
app.get('/vs/samsung',function(req,res){
if(lotte.v>samsung.v){
res.send('Lotte VS Samsung : Lotte Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/samsung_l.html").pipe(res);
}
else{
res.send('Lotte VS Samsung : Samsung Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/samsung_w.html").pipe(res);
}
})
app.get('/vs_kiwoom',function(req,res){
app.get('/vs/kiwoom',function(req,res){
if(lotte.v>kia.v){
res.send('Lotte VS Kiwoom : Lotte Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/kiwoom_l.html").pipe(res);
}
else{
res.send('Lotte VS Kiwoom : Kiwoom Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/kiwoom_w.html").pipe(res);
}
})
app.get('/vs_kt',function(req,res){
app.get('/vs/kt',function(req,res){
if(lotte.v>kia.v){
res.send('Lotte VS KT : Lotte Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/kt_l.html").pipe(res);
}
else{
res.send('Lotte VS KT : KT Win!');
res.writeHead(200,{"Content-Type":"text/html"});
fs.createReadStream("./html/kt_w.html").pipe(res);
}
})
......