GyuhoLee

[Update] Connect to port

1 +<!DOCTYPE html>
2 +<html lang="en">
3 +
4 +<head>
5 + <meta charset="UTF-8">
6 + <title>OSW</title>
7 + <link rel="stylesheet" href="/css/style.css" crossorigin="anonymous">
8 + <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
9 + integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
10 + <link href="https://fonts.googleapis.com/css?family=Jua&display=swap" rel="stylesheet">
11 +</head>
12 +
13 +<body>
14 + helloworld
15 +
16 +
17 + <script src="https://code.jquery.com/jquery-3.3.1.min.js"
18 + integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT"
19 + crossorigin="anonymous"></script>
20 + <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
21 + integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
22 + crossorigin="anonymous"></script>
23 + <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
24 + integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
25 + crossorigin="anonymous"></script>
26 +</body>
27 +
28 +</html>
...\ No newline at end of file ...\ No newline at end of file
...@@ -14,6 +14,9 @@ code = [] ...@@ -14,6 +14,9 @@ code = []
14 for cell in sheet['E']: 14 for cell in sheet['E']:
15 code.append(cell.value) 15 code.append(cell.value)
16 16
17 +
18 +sys.stdin.reconfigure(encoding='utf-8')
19 +sys.stdout.reconfigure(encoding='utf-8')
17 area = input() 20 area = input()
18 print(area) 21 print(area)
19 col = code.index(area) 22 col = code.index(area)
......
1 +var http = require('http');
2 +var fs = require('fs');
3 +var app = http.createServer(function(request,response){
4 + var url = request.url;
5 + if(request.url == '/'){
6 + url = '/index.html';
7 + }
8 + if(request.url == '/favicon.ico'){
9 + response.writeHead(404);
10 + response.end();
11 + return;
12 + }
13 + response.writeHead(200);
14 + response.end(fs.readFileSync(__dirname + url));
15 +
16 +});
17 +app.listen(3000);
18 +
1 const {PythonShell} = require('python-shell'); 19 const {PythonShell} = require('python-shell');
2 -let iconv = require('iconv-lite');
3 -let fs = require('fs');
4 20
5 var options = { 21 var options = {
6 mode: 'text', 22 mode: 'text',
7 pythonOptions: ['-u'], 23 pythonOptions: ['-u'],
8 scriptPath: '', 24 scriptPath: '',
9 - args: ["영통1동"], 25 + encoding: 'utf8',
10 - pythonPath: '' 26 + args: ["영통1동"]
11 }; 27 };
12 28
29 +var arr;
13 var test = new PythonShell('recommend_clothes.py', options); 30 var test = new PythonShell('recommend_clothes.py', options);
14 -var data='"영통1동"'; 31 +var data='영통1동';
15 test.send(data); 32 test.send(data);
16 test.on('message',function(message){ 33 test.on('message',function(message){
17 - console.log(message);
18 -})
...\ No newline at end of file ...\ No newline at end of file
34 + arr = message.split(' ');
35 +})
36 +
......