app.js
638 Bytes
var XLSX = require('xlsx');
var express = require('express')
var app = express();
var workbook = XLSX.readFile('data_0601.xlsx');
var firstWsheetName = workbook.SheetNames[0];
var firstWsheet = workbook.Sheets[firstWsheetName];
var Lotte = firstWsheet['P4'];
var kia = firstWsheet['P9'];
app.get('/',function(req,res){
if(Lotte>kia){
res.send('Lotte VS Kia : Lotte Win!');
}
else{
res.send('Lotte VS Kia : Kia 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)
})