app.js
2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
var XLSX = require('xlsx');
var express = require('express')
var app = express();
var workbook = XLSX.readFile('data.xlsx');
var firstWsheetName = workbook.SheetNames[0];
var firstWsheet = workbook.Sheets[firstWsheetName];
var lotte = firstWsheet['P2'];
var lg = firstWsheet['P3'];
var sk = firstWsheet['P4'];
var hanhwa = firstWsheet['P5'];
var nc = firstWsheet['P6'];
var doosan = firstWsheet['P7'];
var samsung = firstWsheet['P8'];
var kia = firstWsheet['P9'];
var kiwoom = firstWsheet['P10'];
var kt = firstWsheet['P11'];
/*
app.get('/menu',function(req,res){
res.send('--------------MENU--------------');
})
*/
app.get('/vs_lg',function(req,res){
if(lotte.v>lg.v){
res.send('Lotte VS LG : Lotte Win!');
}
else{
res.send('Lotte VS LG : LG Win!');
}
})
app.get('/vs_kia',function(req,res){
if(lotte.v>kia.v){
res.send('Lotte VS Kia : Lotte Win!');
}
else{
res.send('Lotte VS Kia : Kia Win!');
}
})
app.get('/vs_sk',function(req,res){
if(lotte.v>sk.v){
res.send('Lotte VS SK : Lotte Win!');
}
else{
res.send('Lotte VS SK : SK Win!');
}
})
app.get('/vs_hanhwa',function(req,res){
if(lotte.v>hanhwa.v){
res.send('Lotte VS Hanhwa : Lotte Win!');
}
else{
res.send('Lotte VS Hanhwa : HanHwa Win!');
}
})
app.get('/vs_nc',function(req,res){
if(lotte.v>nc.v){
res.send('Lotte VS NC : Lotte Win!');
}
else{
res.send('Lotte VS NC : NC Win!');
}
})
app.get('/vs_doosan',function(req,res){
if(lotte.v>doosan.v){
res.send('Lotte VS Doosan : Lotte Win!');
}
else{
res.send('Lotte VS Doosan : Doosan Win!');
}
})
app.get('/vs_samsung',function(req,res){
if(lotte.v>samsung.v){
res.send('Lotte VS Samsung : Lotte Win!');
}
else{
res.send('Lotte VS Samsung : Samsung Win!');
}
})
app.get('/vs_kiwoom',function(req,res){
if(lotte.v>kia.v){
res.send('Lotte VS Kiwoom : Lotte Win!');
}
else{
res.send('Lotte VS Kiwoom : Kiwoom Win!');
}
})
app.get('/vs_kt',function(req,res){
if(lotte.v>kia.v){
res.send('Lotte VS KT : Lotte Win!');
}
else{
res.send('Lotte VS KT : KT Win!');
}
})
var server = app.listen(23023,function(){
var host = server.address().address
var port = server.address().port
console.log("Listening at http://%s:%s",host,port)
})
console.log(lotte.v,lg.v)