Merge branch 'test' into 'master'
Test See merge request !1
Showing
5 changed files
with
71 additions
and
1 deletions
LICENSE
0 → 100644
| 1 | +MIT License | ||
| 2 | + | ||
| 3 | +Copyright (c) 2020 정지은, 김대욱 | ||
| 4 | + | ||
| 5 | +Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 6 | +of this software and associated documentation files (the "Software"), to deal | ||
| 7 | +in the Software without restriction, including without limitation the rights | ||
| 8 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 9 | +copies of the Software, and to permit persons to whom the Software is | ||
| 10 | +furnished to do so, subject to the following conditions: | ||
| 11 | + | ||
| 12 | +The above copyright notice and this permission notice shall be included in all | ||
| 13 | +copies or substantial portions of the Software. | ||
| 14 | + | ||
| 15 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 16 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 17 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 18 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 19 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 20 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 21 | +SOFTWARE. | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -11,6 +11,10 @@ EPL 통계 사이트 | ... | @@ -11,6 +11,10 @@ EPL 통계 사이트 |
| 11 | 11 | ||
| 12 | --- | 12 | --- |
| 13 | 13 | ||
| 14 | +## 설치 방법 | ||
| 15 | +1. git clone http://khuhub.khu.ac.kr/2018102163/OSS_PROJECT.git | ||
| 16 | +2. npm install | ||
| 17 | + | ||
| 14 | ## 빌드 방법 | 18 | ## 빌드 방법 |
| 15 | 19 | ||
| 16 | 20 | ||
| ... | @@ -19,4 +23,5 @@ EPL 통계 사이트 | ... | @@ -19,4 +23,5 @@ EPL 통계 사이트 |
| 19 | ## 사용 방법 | 23 | ## 사용 방법 |
| 20 | 24 | ||
| 21 | 25 | ||
| 22 | -## LICENSE | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 26 | +## LICENSE | ||
| 27 | +MIT LICENSE | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
nodejs/package-lock.json
0 → 100644
This diff is collapsed. Click to expand it.
nodejs/package.json
0 → 100644
| 1 | +{ | ||
| 2 | + "name": "nodejs", | ||
| 3 | + "version": "1.0.0", | ||
| 4 | + "description": "", | ||
| 5 | + "main": "index.js", | ||
| 6 | + "scripts": { | ||
| 7 | + "test": "echo \"Error: no test specified\" && exit 1" | ||
| 8 | + }, | ||
| 9 | + "author": "", | ||
| 10 | + "license": "ISC", | ||
| 11 | + "dependencies": { | ||
| 12 | + "express": "^4.17.1", | ||
| 13 | + "request": "^2.88.2" | ||
| 14 | + } | ||
| 15 | +} |
nodejs/server.js
0 → 100644
| 1 | +const request = require('request'); | ||
| 2 | +var express = require('express') | ||
| 3 | +var app = express() | ||
| 4 | + | ||
| 5 | +const options = { | ||
| 6 | + method: 'GET', | ||
| 7 | + url: 'https://api-football-v1.p.rapidapi.com/v2/players/player/253/2018-2019', | ||
| 8 | + headers: { | ||
| 9 | + 'x-rapidapi-key': '9ed13b26e4mshede3aa7b615039ep17f6e6jsn308dd6295276', | ||
| 10 | + 'x-rapidapi-host': 'api-football-v1.p.rapidapi.com', | ||
| 11 | + useQueryString: true | ||
| 12 | + } | ||
| 13 | +}; | ||
| 14 | + | ||
| 15 | +app.get('/', function(req, res){ | ||
| 16 | + request(options, function (error, response, body) { | ||
| 17 | + if (error) throw new Error(error); | ||
| 18 | + | ||
| 19 | + res.send(body); | ||
| 20 | + console.log(response); | ||
| 21 | + }); | ||
| 22 | + | ||
| 23 | +}) | ||
| 24 | + | ||
| 25 | +var server = app.listen(23023, function(){ | ||
| 26 | + var host = server.address().address | ||
| 27 | + var port = server.address().port; | ||
| 28 | + console.log('App listening at http://%s:%s', host, port) | ||
| 29 | +}) |
-
Please register or login to post a comment