Showing
14 changed files
with
176 additions
and
474 deletions
.env
deleted
100644 → 0
AfterLogin.png
deleted
100644 → 0

146 KB
Database/facebookbot.sql
0 → 100644
This diff could not be displayed because it is too large.
Database/lecture.json
deleted
100644 → 0
1 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2825"},"lecturename":"전공 기초","__v":{"$numberInt":"0"}} | ||
2 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2826"},"lecturename":"미분적분학","__v":{"$numberInt":"0"}} | ||
3 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2827"},"lecturename":"선형대수","__v":{"$numberInt":"0"}} | ||
4 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2828"},"lecturename":"확률 및 랜덤변수","__v":{"$numberInt":"0"}} | ||
5 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2829"},"lecturename":"미분방정식","__v":{"$numberInt":"0"}} | ||
6 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced282a"},"lecturename":"이산구조","__v":{"$numberInt":"0"}} | ||
7 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced282b"},"lecturename":"전공 필수","__v":{"$numberInt":"0"}} | ||
8 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced282c"},"lecturename":"웹/파이선프로그래밍","__v":{"$numberInt":"0"}} | ||
9 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced282d"},"lecturename":"객체지향프로그래밍","__v":{"$numberInt":"0"}} | ||
10 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced282e"},"lecturename":"논리회로","__v":{"$numberInt":"0"}} | ||
11 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced282f"},"lecturename":"컴퓨터구조","__v":{"$numberInt":"0"}} | ||
12 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2830"},"lecturename":"자료구조","__v":{"$numberInt":"0"}} | ||
13 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2831"},"lecturename":"운영체제","__v":{"$numberInt":"0"}} | ||
14 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2832"},"lecturename":"컴퓨터네트워크","__v":{"$numberInt":"0"}} | ||
15 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2833"},"lecturename":"소프트웨어공학","__v":{"$numberInt":"0"}} | ||
16 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2834"},"lecturename":"알고리즘분석","__v":{"$numberInt":"0"}} | ||
17 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2835"},"lecturename":"데이터베이스","__v":{"$numberInt":"0"}} | ||
18 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2836"},"lecturename":"오픈소스SW개발","__v":{"$numberInt":"0"}} | ||
19 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2837"},"lecturename":"IT기술영어 1","__v":{"$numberInt":"0"}} | ||
20 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2838"},"lecturename":"IT기술영어 2","__v":{"$numberInt":"0"}} | ||
21 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2839"},"lecturename":"IT기술영어 3","__v":{"$numberInt":"0"}} | ||
22 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced283a"},"lecturename":"캡스톤디자인 1","__v":{"$numberInt":"0"}} | ||
23 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced283b"},"lecturename":"캡스톤디자인 2","__v":{"$numberInt":"0"}} | ||
24 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced283c"},"lecturename":"졸업논문","__v":{"$numberInt":"0"}} | ||
25 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced283d"},"lecturename":"전공 선택","__v":{"$numberInt":"0"}} | ||
26 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced283e"},"lecturename":"문제해결","__v":{"$numberInt":"0"}} | ||
27 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced283f"},"lecturename":"형식언어 및컴파일러","__v":{"$numberInt":"0"}} | ||
28 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2840"},"lecturename":"파일처리","__v":{"$numberInt":"0"}} | ||
29 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2841"},"lecturename":"멀티미디어시스템","__v":{"$numberInt":"0"}} | ||
30 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2842"},"lecturename":"시스템분석 및 설계","__v":{"$numberInt":"0"}} | ||
31 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2843"},"lecturename":"프로그래밍언어구조론","__v":{"$numberInt":"0"}} | ||
32 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2844"},"lecturename":"JAVA프로그래밍","__v":{"$numberInt":"0"}} | ||
33 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2845"},"lecturename":"SW스타트업비즈니스","__v":{"$numberInt":"0"}} | ||
34 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2846"},"lecturename":"SW스타트업프로젝트","__v":{"$numberInt":"0"}} | ||
35 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2847"},"lecturename":"최신기술프로젝트 1","__v":{"$numberInt":"0"}} | ||
36 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2848"},"lecturename":"최신기술프로젝트 2","__v":{"$numberInt":"0"}} | ||
37 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2849"},"lecturename":"최신기술콜로키움 1","__v":{"$numberInt":"0"}} | ||
38 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced284a"},"lecturename":"최신기술콜로키움 2","__v":{"$numberInt":"0"}} | ||
39 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced284b"},"lecturename":"단기현장실습","__v":{"$numberInt":"0"}} | ||
40 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced284c"},"lecturename":"장기현장실습","__v":{"$numberInt":"0"}} | ||
41 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced284d"},"lecturename":"연구연수활동 1","__v":{"$numberInt":"0"}} | ||
42 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced284e"},"lecturename":"연구연수활동 2","__v":{"$numberInt":"0"}} | ||
43 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced284f"},"lecturename":"독립심화학습1 (컴퓨터공학과)","__v":{"$numberInt":"0"}} | ||
44 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2850"},"lecturename":"독립심화학습2 (컴퓨터공학과)","__v":{"$numberInt":"0"}} | ||
45 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2851"},"lecturename":"인공지능","__v":{"$numberInt":"0"}} | ||
46 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2852"},"lecturename":"머신러닝","__v":{"$numberInt":"0"}} | ||
47 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2853"},"lecturename":"빅데이터프로그래밍","__v":{"$numberInt":"0"}} | ||
48 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2854"},"lecturename":"클라우드컴퓨팅","__v":{"$numberInt":"0"}} | ||
49 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2855"},"lecturename":"데이터센터프로그래밍","__v":{"$numberInt":"0"}} | ||
50 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2856"},"lecturename":"네트워크분석및 설계","__v":{"$numberInt":"0"}} | ||
51 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2857"},"lecturename":"인터넷프로토콜및 프로그래밍","__v":{"$numberInt":"0"}} | ||
52 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2858"},"lecturename":"정보보호","__v":{"$numberInt":"0"}} | ||
53 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2859"},"lecturename":"모바일프로그래밍","__v":{"$numberInt":"0"}} | ||
54 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced285a"},"lecturename":"웹서비스프로그래밍","__v":{"$numberInt":"0"}} | ||
55 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced285b"},"lecturename":"리눅스시스템프로그래밍","__v":{"$numberInt":"0"}} | ||
56 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced285c"},"lecturename":"IoT디지털시스템","__v":{"$numberInt":"0"}} | ||
57 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced285d"},"lecturename":"IoT소프트웨어","__v":{"$numberInt":"0"}} | ||
58 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced285e"},"lecturename":"로봇소프트웨어","__v":{"$numberInt":"0"}} | ||
59 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced285f"},"lecturename":"영상처리","__v":{"$numberInt":"0"}} | ||
60 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2860"},"lecturename":"컴퓨터그래픽스","__v":{"$numberInt":"0"}} | ||
61 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2861"},"lecturename":"멀티미디어처리","__v":{"$numberInt":"0"}} | ||
62 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2862"},"lecturename":"인간-컴퓨터상호작용","__v":{"$numberInt":"0"}} | ||
63 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2863"},"lecturename":"UI/UX프로그래밍","__v":{"$numberInt":"0"}} | ||
64 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2864"},"lecturename":"컴퓨터비젼","__v":{"$numberInt":"0"}} | ||
65 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2865"},"lecturename":"디자인적사고","__v":{"$numberInt":"0"}} | ||
66 | -{"_id":{"$oid":"5cf0da0c7c7624ccbced2866"},"lecturename":"신호와시스템","__v":{"$numberInt":"0"}} |
khu.js
deleted
100644 → 0
1 | -const puppeteer = require('puppeteer'); | ||
2 | -const request = require('request'); | ||
3 | - | ||
4 | -(async () => { | ||
5 | - const browser = await puppeteer.launch(); | ||
6 | - const page = await browser.newPage(); | ||
7 | - await page.goto('http://ce.khu.ac.kr/index.php?hCode=UNIVERSITY_02_01_01'); | ||
8 | - await page.screenshot({path: 'test.png'}); | ||
9 | - var lecture = []; | ||
10 | - lecture = await page.evaluate(() => { | ||
11 | - const anchors = Array.from(document.querySelectorAll('#conTD > td > div > table > tbody > tr > td:nth-child(2)')); | ||
12 | - return anchors.map(anchor => anchor.textContent); | ||
13 | - }) | ||
14 | - | ||
15 | - lecture.push("디자인적사고") | ||
16 | - lecture.push("신호와시스템") | ||
17 | - console.log(lecture) | ||
18 | - var opts | ||
19 | - | ||
20 | - | ||
21 | - var posturl = "mongodb://localhost/facebookbot" + "/lectures" | ||
22 | - for(var i=0; i<lecture.length; i++){ | ||
23 | - console.log(lecture[i]) | ||
24 | - request.post('http://127.0.0.1:4500/lectures', { | ||
25 | - form: { | ||
26 | - lecturename: lecture[i] | ||
27 | - } | ||
28 | - }) | ||
29 | - } | ||
30 | - await browser.close(); | ||
31 | -})(); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | const puppeteer = require('puppeteer'); | 1 | const puppeteer = require('puppeteer'); |
2 | +const request = require('request'); | ||
3 | +const mysql = require('mysql'); | ||
4 | +const util = require('util'); | ||
5 | +var emojiStrip = require('emoji-strip') | ||
6 | + | ||
7 | +var connection = mysql.createConnection({ | ||
8 | + host : 'localhost', | ||
9 | + user : 'root', | ||
10 | + password : '', | ||
11 | + port : 3306, | ||
12 | + database : 'facebookbot' | ||
13 | +}) | ||
14 | +const query = util.promisify(connection.query).bind(connection); | ||
15 | + | ||
2 | (async () => { | 16 | (async () => { |
3 | const browser = await puppeteer.launch(); | 17 | const browser = await puppeteer.launch(); |
4 | const page = await browser.newPage(); | 18 | const page = await browser.newPage(); |
19 | + await page.goto('http://ce.khu.ac.kr/index.php?hCode=UNIVERSITY_02_01_01'); | ||
20 | + await page.screenshot({path: 'test.png'}); | ||
21 | + var lecture = []; | ||
22 | + lecture = await page.evaluate(() => { | ||
23 | + const anchors = Array.from(document.querySelectorAll('#conTD > td > div > table > tbody > tr > td:nth-child(2)')); | ||
24 | + return anchors.map(anchor => anchor.textContent); | ||
25 | + }) | ||
26 | + | ||
27 | + lecture.push("디자인적사고") | ||
28 | + lecture.push("신호와시스템") | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | + for(var i=0; i<lecture.length; i++){ | ||
33 | + console.log(lecture[i]) | ||
34 | + await query('INSERT INTO lectures (lecturename) VALUES (?)',lecture[i]) | ||
35 | + } | ||
36 | + | ||
37 | + | ||
38 | + const browser = await puppeteer.launch(); | ||
39 | + const page = await browser.newPage(); | ||
5 | const et_id = ""; | 40 | const et_id = ""; |
6 | const et_pw = ""; | 41 | const et_pw = ""; |
7 | - const lecture = ""; | ||
8 | await page.goto('https://everytime.kr/login'); | 42 | await page.goto('https://everytime.kr/login'); |
9 | await page.evaluate((id, pw) => { | 43 | await page.evaluate((id, pw) => { |
10 | document.querySelector("input[name=userid]").value = id; | 44 | document.querySelector("input[name=userid]").value = id; |
... | @@ -13,10 +47,22 @@ const puppeteer = require('puppeteer'); | ... | @@ -13,10 +47,22 @@ const puppeteer = require('puppeteer'); |
13 | await console.log("로그인 정보 삽입 완료") | 47 | await console.log("로그인 정보 삽입 완료") |
14 | await page.click('#container > form > p.submit > input'); | 48 | await page.click('#container > form > p.submit > input'); |
15 | await page.waitFor(1000); | 49 | await page.waitFor(1000); |
50 | + | ||
51 | + | ||
52 | + var lecary = []; | ||
53 | + const rows = await query('SELECT * FROM lectures'); | ||
54 | + for(var i =0; i<rows.length; i++){ | ||
55 | + lecary.push(rows[i].lecturename) | ||
56 | + } | ||
57 | + console.log(lecary) | ||
58 | + | ||
59 | + for(var i=0 ; i< lecary.length; i++){ | ||
60 | + var templecture = lecary[i]; | ||
61 | + console.log(lecture); | ||
16 | await page.goto('https://everytime.kr/lecture'); | 62 | await page.goto('https://everytime.kr/lecture'); |
17 | await page.evaluate((lec) => { | 63 | await page.evaluate((lec) => { |
18 | document.querySelector("input[name=keyword]").value = lec; | 64 | document.querySelector("input[name=keyword]").value = lec; |
19 | - }, lecture); | 65 | + }, templecture); |
20 | await page.click('#container > form > input.submit'); | 66 | await page.click('#container > form > input.submit'); |
21 | await page.waitFor(1000); | 67 | await page.waitFor(1000); |
22 | 68 | ||
... | @@ -25,10 +71,9 @@ const puppeteer = require('puppeteer'); | ... | @@ -25,10 +71,9 @@ const puppeteer = require('puppeteer'); |
25 | }, 'lecture'); | 71 | }, 'lecture'); |
26 | console.log(tempclass) | 72 | console.log(tempclass) |
27 | 73 | ||
28 | - | 74 | + for (var j = 0; j < tempclass.length; j++) { |
29 | - for (var i in tempclass) { | 75 | + console.log(tempclass[j]); |
30 | - console.log(tempclass[i]); | 76 | + await page.goto(tempclass[j]); |
31 | - await page.goto(tempclass[i]); | ||
32 | await page.waitFor(1000); | 77 | await page.waitFor(1000); |
33 | await page.waitForSelector('#container > div.side.head > h2'); | 78 | await page.waitForSelector('#container > div.side.head > h2'); |
34 | const lecturename = await page.evaluate(() => { | 79 | const lecturename = await page.evaluate(() => { |
... | @@ -53,12 +98,17 @@ const puppeteer = require('puppeteer'); | ... | @@ -53,12 +98,17 @@ const puppeteer = require('puppeteer'); |
53 | return anchors4.map(anchor4 => anchor4.textContent); | 98 | return anchors4.map(anchor4 => anchor4.textContent); |
54 | }); | 99 | }); |
55 | } | 100 | } |
56 | - //콘솔에 출력한다. | ||
57 | console.log(lecturename.join('\n')); | 101 | console.log(lecturename.join('\n')); |
58 | console.log(proname.join('\n')); | 102 | console.log(proname.join('\n')); |
59 | console.log(avg_rate.join('\n')); | 103 | console.log(avg_rate.join('\n')); |
60 | console.log(review); | 104 | console.log(review); |
105 | + review = review.toString() | ||
106 | + review = emojiStrip(review) | ||
107 | + | ||
108 | + await query('INSERT INTO reviews (lecturename,proname,avg_rate,review) VALUES (?,?,?,?)',[lecturename,proname,avg_rate,review]) | ||
109 | + } | ||
61 | } | 110 | } |
62 | 111 | ||
63 | await browser.close(); | 112 | await browser.close(); |
113 | + connection.end(); | ||
64 | })(); | 114 | })(); |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
models/lecture.js
deleted
100644 → 0
1 | -const mongoose = require('mongoose'); | ||
2 | - | ||
3 | - | ||
4 | -const LectureSchema = new mongoose.Schema({ | ||
5 | - lecturename: { type: String, required: true, unique: true } | ||
6 | -}); | ||
7 | - | ||
8 | -// // Create new review document | ||
9 | -LectureSchema.statics.create = function (payload) { | ||
10 | - // this === Model | ||
11 | - const review = new this(payload); | ||
12 | - // return Promise | ||
13 | - return review.save(); | ||
14 | -}; | ||
15 | - | ||
16 | -// Find All | ||
17 | -LectureSchema.statics.findAll = function () { | ||
18 | - // return promise | ||
19 | - // V4부터 exec() 필요없음 | ||
20 | - return this.find({}); | ||
21 | -}; | ||
22 | - | ||
23 | -// Find One by lecturename | ||
24 | -LectureSchema.statics.findOneBylecturename = function (lecturename) { | ||
25 | - return this.findOne({ lecturename }); | ||
26 | -}; | ||
27 | - | ||
28 | -// Update by lecturename | ||
29 | -LectureSchema.statics.updateBylecturename = function (lecturename, payload) { | ||
30 | - // { new: true }: return the modified document rather than the original. defaults to false | ||
31 | - return this.findOneAndUpdate({ lecturename }, payload, { new: true }); | ||
32 | -}; | ||
33 | - | ||
34 | -// Delete by lecturename | ||
35 | -LectureSchema.statics.deleteBylecturename = function (lecturename) { | ||
36 | - return this.remove({ lecturename }); | ||
37 | -}; | ||
38 | - | ||
39 | -// Create Model & Export | ||
40 | -module.exports = mongoose.model('Lecture', LectureSchema); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
models/review.js
deleted
100644 → 0
1 | -const mongoose = require('mongoose'); | ||
2 | - | ||
3 | -// Define Schemes | ||
4 | -const reviewSchema = new mongoose.Schema({ | ||
5 | - lecturename: { type: String }, | ||
6 | - proname: { type: String }, | ||
7 | - avg_rate: { type: Number }, | ||
8 | - review: {type : String} | ||
9 | -}); | ||
10 | - | ||
11 | - | ||
12 | -// // Create new lecture document | ||
13 | -reviewSchema.statics.create = function (payload) { | ||
14 | - // this === Model | ||
15 | - const lecture = new this(payload); | ||
16 | - // return Promise | ||
17 | - return lecture.save(); | ||
18 | -}; | ||
19 | - | ||
20 | -// Find lecturename | ||
21 | -reviewSchema.statics.findBylecturename = function (lecturename) { | ||
22 | - // return promise | ||
23 | - // V4부터 exec() 필요없음 | ||
24 | - return this.find({ lecturename }); | ||
25 | -}; | ||
26 | - | ||
27 | -// Find by professor name | ||
28 | -reviewSchema.statics.findByproname = function (proname) { | ||
29 | - return this.find({ proname }); | ||
30 | -}; | ||
31 | - | ||
32 | -// Update by lecturename | ||
33 | -reviewSchema.statics.updateBylecturename = function (lecturename, payload) { | ||
34 | - // { new: true }: return the modified document rather than the original. defaults to false | ||
35 | - return this.findOneAndUpdate({ lecturename }, payload, { new: true }); | ||
36 | -}; | ||
37 | - | ||
38 | -// Delete by lecturename | ||
39 | -reviewSchema.statics.deleteBylecturename = function (lecturename) { | ||
40 | - return this.remove({ lecturename }); | ||
41 | -}; | ||
42 | - | ||
43 | -// Create Model & Export | ||
44 | -module.exports = mongoose.model('Review', reviewSchema); |
... | @@ -50,14 +50,6 @@ | ... | @@ -50,14 +50,6 @@ |
50 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", | 50 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", |
51 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" | 51 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" |
52 | }, | 52 | }, |
53 | - "async": { | ||
54 | - "version": "2.6.2", | ||
55 | - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", | ||
56 | - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", | ||
57 | - "requires": { | ||
58 | - "lodash": "^4.17.11" | ||
59 | - } | ||
60 | - }, | ||
61 | "async-limiter": { | 53 | "async-limiter": { |
62 | "version": "1.0.0", | 54 | "version": "1.0.0", |
63 | "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", | 55 | "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", |
... | @@ -91,10 +83,10 @@ | ... | @@ -91,10 +83,10 @@ |
91 | "tweetnacl": "^0.14.3" | 83 | "tweetnacl": "^0.14.3" |
92 | } | 84 | } |
93 | }, | 85 | }, |
94 | - "bluebird": { | 86 | + "bignumber.js": { |
95 | - "version": "3.5.1", | 87 | + "version": "7.2.1", |
96 | - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", | 88 | + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", |
97 | - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" | 89 | + "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==" |
98 | }, | 90 | }, |
99 | "body-parser": { | 91 | "body-parser": { |
100 | "version": "1.19.0", | 92 | "version": "1.19.0", |
... | @@ -122,16 +114,16 @@ | ... | @@ -122,16 +114,16 @@ |
122 | "concat-map": "0.0.1" | 114 | "concat-map": "0.0.1" |
123 | } | 115 | } |
124 | }, | 116 | }, |
125 | - "bson": { | ||
126 | - "version": "1.1.1", | ||
127 | - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.1.tgz", | ||
128 | - "integrity": "sha512-jCGVYLoYMHDkOsbwJZBCqwMHyH4c+wzgI9hG7Z6SZJRXWr+x58pdIbm2i9a/jFGCkRJqRUr8eoI7lDWa0hTkxg==" | ||
129 | - }, | ||
130 | "buffer-from": { | 117 | "buffer-from": { |
131 | "version": "1.1.1", | 118 | "version": "1.1.1", |
132 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", | 119 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", |
133 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" | 120 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" |
134 | }, | 121 | }, |
122 | + "buffer-shims": { | ||
123 | + "version": "1.0.0", | ||
124 | + "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", | ||
125 | + "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=" | ||
126 | + }, | ||
135 | "bytes": { | 127 | "bytes": { |
136 | "version": "3.1.0", | 128 | "version": "3.1.0", |
137 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", | 129 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", |
... | @@ -225,10 +217,10 @@ | ... | @@ -225,10 +217,10 @@ |
225 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", | 217 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", |
226 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" | 218 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" |
227 | }, | 219 | }, |
228 | - "dotenv": { | 220 | + "each-series": { |
229 | - "version": "8.0.0", | 221 | + "version": "1.0.0", |
230 | - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.0.0.tgz", | 222 | + "resolved": "https://registry.npmjs.org/each-series/-/each-series-1.0.0.tgz", |
231 | - "integrity": "sha512-30xVGqjLjiUOArT4+M5q9sYdvuR4riM6yK9wMcas9Vbp6zZa+ocC9dp6QoftuhTPhFAiLK/0C5Ni2nou/Bk8lg==" | 223 | + "integrity": "sha1-+Ibmxm39sl7x/nNWQUbuXLR4r8s=" |
232 | }, | 224 | }, |
233 | "ecc-jsbn": { | 225 | "ecc-jsbn": { |
234 | "version": "0.1.2", | 226 | "version": "0.1.2", |
... | @@ -244,6 +236,19 @@ | ... | @@ -244,6 +236,19 @@ |
244 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", | 236 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", |
245 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" | 237 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" |
246 | }, | 238 | }, |
239 | + "emoji-regex": { | ||
240 | + "version": "6.5.1", | ||
241 | + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-6.5.1.tgz", | ||
242 | + "integrity": "sha512-PAHp6TxrCy7MGMFidro8uikr+zlJJKJ/Q6mm2ExZ7HwkyR9lSVFfE3kt36qcwa24BQL7y0G9axycGjK1A/0uNQ==" | ||
243 | + }, | ||
244 | + "emoji-strip": { | ||
245 | + "version": "1.0.1", | ||
246 | + "resolved": "https://registry.npmjs.org/emoji-strip/-/emoji-strip-1.0.1.tgz", | ||
247 | + "integrity": "sha1-z5OQU1BEEhiIQgrk20NtA6bMRZ0=", | ||
248 | + "requires": { | ||
249 | + "emoji-regex": "^6.1.3" | ||
250 | + } | ||
251 | + }, | ||
247 | "encodeurl": { | 252 | "encodeurl": { |
248 | "version": "1.0.2", | 253 | "version": "1.0.2", |
249 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", | 254 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", |
... | @@ -546,27 +551,11 @@ | ... | @@ -546,27 +551,11 @@ |
546 | "verror": "1.10.0" | 551 | "verror": "1.10.0" |
547 | } | 552 | } |
548 | }, | 553 | }, |
549 | - "kareem": { | ||
550 | - "version": "2.3.0", | ||
551 | - "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.0.tgz", | ||
552 | - "integrity": "sha512-6hHxsp9e6zQU8nXsP+02HGWXwTkOEw6IROhF2ZA28cYbUk4eJ6QbtZvdqZOdD9YPKghG3apk5eOCvs+tLl3lRg==" | ||
553 | - }, | ||
554 | - "lodash": { | ||
555 | - "version": "4.17.11", | ||
556 | - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", | ||
557 | - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" | ||
558 | - }, | ||
559 | "media-typer": { | 554 | "media-typer": { |
560 | "version": "0.3.0", | 555 | "version": "0.3.0", |
561 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", | 556 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", |
562 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" | 557 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" |
563 | }, | 558 | }, |
564 | - "memory-pager": { | ||
565 | - "version": "1.5.0", | ||
566 | - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", | ||
567 | - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", | ||
568 | - "optional": true | ||
569 | - }, | ||
570 | "merge-descriptors": { | 559 | "merge-descriptors": { |
571 | "version": "1.0.1", | 560 | "version": "1.0.1", |
572 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", | 561 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", |
... | @@ -616,103 +605,77 @@ | ... | @@ -616,103 +605,77 @@ |
616 | "minimist": "0.0.8" | 605 | "minimist": "0.0.8" |
617 | } | 606 | } |
618 | }, | 607 | }, |
619 | - "mongodb": { | 608 | + "mongojs": { |
620 | - "version": "3.2.6", | 609 | + "version": "2.6.0", |
621 | - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.2.6.tgz", | 610 | + "resolved": "https://registry.npmjs.org/mongojs/-/mongojs-2.6.0.tgz", |
622 | - "integrity": "sha512-qnHc4tjEkHKemuzBq9R7ycYnhFE0Dlpt6+n6suoZp2DcDdqviQ+teloJU24fsOw/PLmr75yGk4mRx/YabjDQEQ==", | 611 | + "integrity": "sha512-r6tj71DjYcaRTi2jpa+CA6Iq72cTZclB2JKy+Zub+0JPTEq/l2plsAYfF2eHqSYBtZbKNcObvhGYk9E9UKZWJg==", |
623 | "requires": { | 612 | "requires": { |
624 | - "mongodb-core": "3.2.6", | 613 | + "each-series": "^1.0.0", |
625 | - "safe-buffer": "^5.1.2" | 614 | + "mongodb": "^2.2.31", |
615 | + "once": "^1.4.0", | ||
616 | + "parse-mongo-url": "^1.1.1", | ||
617 | + "readable-stream": "^2.3.3", | ||
618 | + "thunky": "^1.0.2", | ||
619 | + "to-mongodb-core": "^2.0.0", | ||
620 | + "xtend": "^4.0.1" | ||
626 | }, | 621 | }, |
627 | "dependencies": { | 622 | "dependencies": { |
628 | - "mongodb-core": { | 623 | + "bson": { |
629 | - "version": "3.2.6", | 624 | + "version": "1.0.9", |
630 | - "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.2.6.tgz", | 625 | + "resolved": "https://registry.npmjs.org/bson/-/bson-1.0.9.tgz", |
631 | - "integrity": "sha512-i+XRVjur9D0ywGF7cFebOUnALnbvMHajdNhhl3TQuopW6QDE655G8CpPeERbqSqfa3rOKEUo08lENDIiBIuAvQ==", | 626 | + "integrity": "sha512-IQX9/h7WdMBIW/q/++tGd+emQr0XMdeZ6icnT/74Xk9fnabWn+gZgpE+9V+gujL3hhJOoNrnDVY7tWdzc7NUTg==" |
632 | - "requires": { | ||
633 | - "bson": "^1.1.1", | ||
634 | - "require_optional": "^1.0.1", | ||
635 | - "safe-buffer": "^5.1.2", | ||
636 | - "saslprep": "^1.0.0" | ||
637 | - } | ||
638 | - } | ||
639 | - } | ||
640 | }, | 627 | }, |
641 | - "mongodb-core": { | 628 | + "es6-promise": { |
642 | - "version": "3.2.5", | 629 | + "version": "3.2.1", |
643 | - "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.2.5.tgz", | 630 | + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz", |
644 | - "integrity": "sha512-czmFd/7Cy+PxItL5KewYgkKTJGb2JyC1PdIdLBVGHER4Vsgu/A+fXDDNO+PLuyHNdh7qbH2XyLP4HHAifgBBoQ==", | 631 | + "integrity": "sha1-7FYjOGgDKQkgcXDDlEjiREndH8Q=" |
645 | - "requires": { | ||
646 | - "bson": "^1.1.1", | ||
647 | - "require_optional": "^1.0.1", | ||
648 | - "safe-buffer": "^5.1.2", | ||
649 | - "saslprep": "^1.0.0" | ||
650 | - } | ||
651 | }, | 632 | }, |
652 | - "mongoose": { | 633 | + "mongodb": { |
653 | - "version": "5.5.11", | 634 | + "version": "2.2.36", |
654 | - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.5.11.tgz", | 635 | + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.36.tgz", |
655 | - "integrity": "sha512-jLYPk4jYe1N5CNwBcj48tQwQZ5Dc8VsnAjdMiqaKh5+CwU9EqEfuEtYMkFhJLu/LaTA4LN7crFzydGHdlAZtmg==", | 636 | + "integrity": "sha512-P2SBLQ8Z0PVx71ngoXwo12+FiSfbNfGOClAao03/bant5DgLNkOPAck5IaJcEk4gKlQhDEURzfR3xuBG1/B+IA==", |
656 | "requires": { | 637 | "requires": { |
657 | - "async": "2.6.2", | 638 | + "es6-promise": "3.2.1", |
658 | - "bson": "~1.1.1", | 639 | + "mongodb-core": "2.1.20", |
659 | - "kareem": "2.3.0", | 640 | + "readable-stream": "2.2.7" |
660 | - "mongodb": "3.2.5", | ||
661 | - "mongodb-core": "3.2.5", | ||
662 | - "mongoose-legacy-pluralize": "1.0.2", | ||
663 | - "mpath": "0.6.0", | ||
664 | - "mquery": "3.2.0", | ||
665 | - "ms": "2.1.1", | ||
666 | - "regexp-clone": "0.0.1", | ||
667 | - "safe-buffer": "5.1.2", | ||
668 | - "sift": "7.0.1", | ||
669 | - "sliced": "1.0.1" | ||
670 | }, | 641 | }, |
671 | "dependencies": { | 642 | "dependencies": { |
672 | - "mongodb": { | 643 | + "readable-stream": { |
673 | - "version": "3.2.5", | 644 | + "version": "2.2.7", |
674 | - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.2.5.tgz", | 645 | + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.7.tgz", |
675 | - "integrity": "sha512-VEu2nsfFMwWA6q6JVnlJ2kNVwjluU4op2J/YiG1LeI14t9HotLXbg8w3I794BvezC4ZCZ/wBTTdby01txalwwQ==", | 646 | + "integrity": "sha1-BwV6y+JGeyIELTb5jFrVBwVOlbE=", |
676 | "requires": { | 647 | "requires": { |
677 | - "mongodb-core": "3.2.5", | 648 | + "buffer-shims": "~1.0.0", |
678 | - "safe-buffer": "^5.1.2" | 649 | + "core-util-is": "~1.0.0", |
650 | + "inherits": "~2.0.1", | ||
651 | + "isarray": "~1.0.0", | ||
652 | + "process-nextick-args": "~1.0.6", | ||
653 | + "string_decoder": "~1.0.0", | ||
654 | + "util-deprecate": "~1.0.1" | ||
679 | } | 655 | } |
680 | - }, | ||
681 | - "ms": { | ||
682 | - "version": "2.1.1", | ||
683 | - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", | ||
684 | - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" | ||
685 | } | 656 | } |
686 | } | 657 | } |
687 | }, | 658 | }, |
688 | - "mongoose-legacy-pluralize": { | 659 | + "mongodb-core": { |
689 | - "version": "1.0.2", | 660 | + "version": "2.1.20", |
690 | - "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", | 661 | + "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.20.tgz", |
691 | - "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" | 662 | + "integrity": "sha512-IN57CX5/Q1bhDq6ShAR6gIv4koFsZP7L8WOK1S0lR0pVDQaScffSMV5jxubLsmZ7J+UdqmykKw4r9hG3XQEGgQ==", |
692 | - }, | ||
693 | - "mpath": { | ||
694 | - "version": "0.6.0", | ||
695 | - "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.6.0.tgz", | ||
696 | - "integrity": "sha512-i75qh79MJ5Xo/sbhxrDrPSEG0H/mr1kcZXJ8dH6URU5jD/knFxCVqVC/gVSW7GIXL/9hHWlT9haLbCXWOll3qw==" | ||
697 | - }, | ||
698 | - "mquery": { | ||
699 | - "version": "3.2.0", | ||
700 | - "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.0.tgz", | ||
701 | - "integrity": "sha512-qPJcdK/yqcbQiKoemAt62Y0BAc0fTEKo1IThodBD+O5meQRJT/2HSe5QpBNwaa4CjskoGrYWsEyjkqgiE0qjhg==", | ||
702 | "requires": { | 663 | "requires": { |
703 | - "bluebird": "3.5.1", | 664 | + "bson": "~1.0.4", |
704 | - "debug": "3.1.0", | 665 | + "require_optional": "~1.0.0" |
705 | - "regexp-clone": "0.0.1", | 666 | + } |
706 | - "safe-buffer": "5.1.2", | ||
707 | - "sliced": "1.0.1" | ||
708 | }, | 667 | }, |
709 | - "dependencies": { | 668 | + "process-nextick-args": { |
710 | - "debug": { | 669 | + "version": "1.0.7", |
711 | - "version": "3.1.0", | 670 | + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", |
712 | - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", | 671 | + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" |
713 | - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", | 672 | + }, |
673 | + "string_decoder": { | ||
674 | + "version": "1.0.3", | ||
675 | + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", | ||
676 | + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", | ||
714 | "requires": { | 677 | "requires": { |
715 | - "ms": "2.0.0" | 678 | + "safe-buffer": "~5.1.0" |
716 | } | 679 | } |
717 | } | 680 | } |
718 | } | 681 | } |
... | @@ -722,6 +685,17 @@ | ... | @@ -722,6 +685,17 @@ |
722 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", | 685 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", |
723 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" | 686 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" |
724 | }, | 687 | }, |
688 | + "mysql": { | ||
689 | + "version": "2.17.1", | ||
690 | + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.17.1.tgz", | ||
691 | + "integrity": "sha512-7vMqHQ673SAk5C8fOzTG2LpPcf3bNt0oL3sFpxPEEFp1mdlDcrLK0On7z8ZYKaaHrHwNcQ/MTUz7/oobZ2OyyA==", | ||
692 | + "requires": { | ||
693 | + "bignumber.js": "7.2.1", | ||
694 | + "readable-stream": "2.3.6", | ||
695 | + "safe-buffer": "5.1.2", | ||
696 | + "sqlstring": "2.3.1" | ||
697 | + } | ||
698 | + }, | ||
725 | "negotiator": { | 699 | "negotiator": { |
726 | "version": "0.6.2", | 700 | "version": "0.6.2", |
727 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", | 701 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", |
... | @@ -748,6 +722,11 @@ | ... | @@ -748,6 +722,11 @@ |
748 | "wrappy": "1" | 722 | "wrappy": "1" |
749 | } | 723 | } |
750 | }, | 724 | }, |
725 | + "parse-mongo-url": { | ||
726 | + "version": "1.1.1", | ||
727 | + "resolved": "https://registry.npmjs.org/parse-mongo-url/-/parse-mongo-url-1.1.1.tgz", | ||
728 | + "integrity": "sha1-ZiON9fjnwMjKTNlw1KtqE3PrdbU=" | ||
729 | + }, | ||
751 | "parseurl": { | 730 | "parseurl": { |
752 | "version": "1.3.3", | 731 | "version": "1.3.3", |
753 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", | 732 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", |
... | @@ -912,11 +891,6 @@ | ... | @@ -912,11 +891,6 @@ |
912 | "util-deprecate": "~1.0.1" | 891 | "util-deprecate": "~1.0.1" |
913 | } | 892 | } |
914 | }, | 893 | }, |
915 | - "regexp-clone": { | ||
916 | - "version": "0.0.1", | ||
917 | - "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-0.0.1.tgz", | ||
918 | - "integrity": "sha1-p8LgmJH9vzj7sQ03b7cwA+aKxYk=" | ||
919 | - }, | ||
920 | "request": { | 894 | "request": { |
921 | "version": "2.88.0", | 895 | "version": "2.88.0", |
922 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", | 896 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", |
... | @@ -983,15 +957,6 @@ | ... | @@ -983,15 +957,6 @@ |
983 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", | 957 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", |
984 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" | 958 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" |
985 | }, | 959 | }, |
986 | - "saslprep": { | ||
987 | - "version": "1.0.3", | ||
988 | - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", | ||
989 | - "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", | ||
990 | - "optional": true, | ||
991 | - "requires": { | ||
992 | - "sparse-bitfield": "^3.0.3" | ||
993 | - } | ||
994 | - }, | ||
995 | "semver": { | 960 | "semver": { |
996 | "version": "5.7.0", | 961 | "version": "5.7.0", |
997 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", | 962 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", |
... | @@ -1040,24 +1005,10 @@ | ... | @@ -1040,24 +1005,10 @@ |
1040 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", | 1005 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", |
1041 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" | 1006 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" |
1042 | }, | 1007 | }, |
1043 | - "sift": { | 1008 | + "sqlstring": { |
1044 | - "version": "7.0.1", | 1009 | + "version": "2.3.1", |
1045 | - "resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz", | 1010 | + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", |
1046 | - "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==" | 1011 | + "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A=" |
1047 | - }, | ||
1048 | - "sliced": { | ||
1049 | - "version": "1.0.1", | ||
1050 | - "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", | ||
1051 | - "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" | ||
1052 | - }, | ||
1053 | - "sparse-bitfield": { | ||
1054 | - "version": "3.0.3", | ||
1055 | - "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", | ||
1056 | - "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", | ||
1057 | - "optional": true, | ||
1058 | - "requires": { | ||
1059 | - "memory-pager": "^1.0.2" | ||
1060 | - } | ||
1061 | }, | 1012 | }, |
1062 | "sshpk": { | 1013 | "sshpk": { |
1063 | "version": "1.16.1", | 1014 | "version": "1.16.1", |
... | @@ -1088,6 +1039,16 @@ | ... | @@ -1088,6 +1039,16 @@ |
1088 | "safe-buffer": "~5.1.0" | 1039 | "safe-buffer": "~5.1.0" |
1089 | } | 1040 | } |
1090 | }, | 1041 | }, |
1042 | + "thunky": { | ||
1043 | + "version": "1.0.3", | ||
1044 | + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz", | ||
1045 | + "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==" | ||
1046 | + }, | ||
1047 | + "to-mongodb-core": { | ||
1048 | + "version": "2.0.0", | ||
1049 | + "resolved": "https://registry.npmjs.org/to-mongodb-core/-/to-mongodb-core-2.0.0.tgz", | ||
1050 | + "integrity": "sha1-NZbsdhOsmtO5ioncua77pWnNJ+s=" | ||
1051 | + }, | ||
1091 | "toidentifier": { | 1052 | "toidentifier": { |
1092 | "version": "1.0.0", | 1053 | "version": "1.0.0", |
1093 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", | 1054 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", |
... | @@ -1192,6 +1153,11 @@ | ... | @@ -1192,6 +1153,11 @@ |
1192 | "async-limiter": "~1.0.0" | 1153 | "async-limiter": "~1.0.0" |
1193 | } | 1154 | } |
1194 | }, | 1155 | }, |
1156 | + "xtend": { | ||
1157 | + "version": "4.0.1", | ||
1158 | + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", | ||
1159 | + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" | ||
1160 | + }, | ||
1195 | "yauzl": { | 1161 | "yauzl": { |
1196 | "version": "2.4.1", | 1162 | "version": "2.4.1", |
1197 | "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", | 1163 | "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", | ... | ... |
... | @@ -11,10 +11,10 @@ | ... | @@ -11,10 +11,10 @@ |
11 | "license": "ISC", | 11 | "license": "ISC", |
12 | "dependencies": { | 12 | "dependencies": { |
13 | "body-parser": "^1.19.0", | 13 | "body-parser": "^1.19.0", |
14 | - "dotenv": "^8.0.0", | 14 | + "emoji-strip": "^1.0.1", |
15 | "express": "^4.17.0", | 15 | "express": "^4.17.0", |
16 | - "mongodb": "^3.2.6", | 16 | + "mongojs": "^2.6.0", |
17 | - "mongoose": "^5.5.11", | 17 | + "mysql": "^2.17.1", |
18 | "puppeteer": "^1.17.0", | 18 | "puppeteer": "^1.17.0", |
19 | "puppeteer-core": "^1.17.0", | 19 | "puppeteer-core": "^1.17.0", |
20 | "request": "^2.88.0" | 20 | "request": "^2.88.0" | ... | ... |
routes/lectures.js
deleted
100644 → 0
1 | -const router = require('express').Router(); | ||
2 | -const Lecture = require('../models/lecture'); | ||
3 | - | ||
4 | -// Find All | ||
5 | -router.get('/', (req, res) => { | ||
6 | - Lecture.findAll() | ||
7 | - .then((Lectures) => { | ||
8 | - if (!Lectures.length) return res.status(404).send({ err: 'Lecture not found' }); | ||
9 | - res.send(`find successfully: ${Lectures}`); | ||
10 | - }) | ||
11 | - .catch(err => res.status(500).send(err)); | ||
12 | -}); | ||
13 | - | ||
14 | -// Find One by lecturename | ||
15 | -router.get('/lecturename/:lecturename', (req, res) => { | ||
16 | - Lecture.findOneBylecturename(req.params.lecturename) | ||
17 | - .then((Lecture) => { | ||
18 | - if (!Lecture) return res.status(404).send({ err: 'Lecture not found' }); | ||
19 | - res.send(`findOne successfully: ${Lecture}`); | ||
20 | - }) | ||
21 | - .catch(err => res.status(500).send(err)); | ||
22 | -}); | ||
23 | - | ||
24 | -// Create new Lecture document | ||
25 | -router.post('/', (req, res) => { | ||
26 | - console.log(req.body) | ||
27 | - Lecture.create(req.body) | ||
28 | - .then(Lecture => res.send(Lecture)) | ||
29 | - .catch(err => res.status(500).send(err)); | ||
30 | -}); | ||
31 | - | ||
32 | -// Update by lecturename | ||
33 | -router.put('/lecturename/:lecturename', (req, res) => { | ||
34 | - Lecture.updateBylecturename(req.params.lecturename, req.body) | ||
35 | - .then(Lecture => res.send(Lecture)) | ||
36 | - .catch(err => res.status(500).send(err)); | ||
37 | -}); | ||
38 | - | ||
39 | -// Delete by lecturename | ||
40 | -router.delete('/lecturename/:lecturename', (req, res) => { | ||
41 | - Lecture.deleteBylecturename(req.params.lecturename) | ||
42 | - .then(() => res.sendStatus(200)) | ||
43 | - .catch(err => res.status(500).send(err)); | ||
44 | -}); | ||
45 | - | ||
46 | -module.exports = router; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
routes/reviews.js
deleted
100644 → 0
1 | -const router = require('express').Router(); | ||
2 | -const Review = require('../models/review'); | ||
3 | - | ||
4 | -// Find All | ||
5 | -router.get('/', (req, res) => { | ||
6 | - Review.findAll() | ||
7 | - .then((Reviews) => { | ||
8 | - if (!Reviews.length) return res.status(404).send({ err: 'Review not found' }); | ||
9 | - res.send(`find successfully: ${Reviews}`); | ||
10 | - }) | ||
11 | - .catch(err => res.status(500).send(err)); | ||
12 | -}); | ||
13 | - | ||
14 | -// Find One by Reviewid | ||
15 | -router.get('/lecturename/:lecturename', (req, res) => { | ||
16 | - Review.findBylecturename(req.params.lecturename) | ||
17 | - .then((Review) => { | ||
18 | - if (!Review) return res.status(404).send({ err: 'Review not found' }); | ||
19 | - res.send(`findOne successfully: ${Review}`); | ||
20 | - }) | ||
21 | - .catch(err => res.status(500).send(err)); | ||
22 | -}); | ||
23 | - | ||
24 | -router.get('/proname/:proname', (req, res) => { | ||
25 | - Review.findByproname(req.params.proname) | ||
26 | - .then((Review) => { | ||
27 | - if (!Review) return res.status(404).send({ err: 'Review not found' }); | ||
28 | - res.send(`findOne successfully: ${Review}`); | ||
29 | - }) | ||
30 | - .catch(err => res.status(500).send(err)); | ||
31 | -}); | ||
32 | - | ||
33 | -// Create new Review document | ||
34 | -router.post('/', (req, res) => { | ||
35 | - console.log(req.body) | ||
36 | - Review.create(req.body) | ||
37 | - .then(Review => res.send(Review)) | ||
38 | - .catch(err => res.status(500).send(err)); | ||
39 | -}); | ||
40 | - | ||
41 | -// Update by lecturename | ||
42 | -router.put('/lecturename/:lecturename', (req, res) => { | ||
43 | - Review.updateBylecturename(req.params.lecturename, req.body) | ||
44 | - .then(Review => res.send(Review)) | ||
45 | - .catch(err => res.status(500).send(err)); | ||
46 | -}); | ||
47 | - | ||
48 | -// Delete by lecturename | ||
49 | -router.delete('/lecturename/:lecturename', (req, res) => { | ||
50 | - Review.deleteBylecturename(req.params.lecturename) | ||
51 | - .then(() => res.sendStatus(200)) | ||
52 | - .catch(err => res.status(500).send(err)); | ||
53 | -}); | ||
54 | - | ||
55 | -module.exports = router; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test.js
deleted
100644 → 0
1 | -// ENV | ||
2 | -require('dotenv').config(); | ||
3 | - | ||
4 | -// DEPENDENCIES | ||
5 | -const express = require('express'); | ||
6 | -const mongoose = require('mongoose'); | ||
7 | -const bodyParser = require('body-parser'); | ||
8 | - | ||
9 | -const app = express(); | ||
10 | -const port = process.env.PORT || 4500; | ||
11 | - | ||
12 | -// Static File Service | ||
13 | -app.use(express.static('public')); | ||
14 | -// Body-parser | ||
15 | -app.use(bodyParser.urlencoded({ extended: true })); | ||
16 | -app.use(bodyParser.json()); | ||
17 | - | ||
18 | -// Node의 native Promise 사용 | ||
19 | -mongoose.Promise = global.Promise; | ||
20 | - | ||
21 | -// Connect to MongoDB | ||
22 | -mongoose.connect(process.env.MONGO_URI) | ||
23 | - .then(() => console.log('Successfully connected to mongodb')) | ||
24 | - .catch(e => console.error(e)); | ||
25 | - | ||
26 | -// ROUTERS | ||
27 | -app.use('/lectures', require('./routes/lectures')); | ||
28 | -app.use('/reviews', require('./routes/reviews')); | ||
29 | -app.listen(port, () => console.log(`Server listening on port ${port}`)); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
test.png
deleted
100644 → 0

334 KB
-
Please register or login to post a comment