Eugene Yoo

캡스톤 디자인2 커밋

Showing 362 changed files with 2382 additions and 2 deletions
# 프로젝트 주제: 최신 웹 구조 습득 및 실습
React, Vue, Apollo, Graph.QL과 같은 최신 웹 기술을 사용하여 퍼포먼스도 뛰어나고 유연한 웹서비스를 구현해보도록 한다.
\ No newline at end of file
# 캡스톤 디자인 2 주제: 최신 웹 구조 습득 및 실습
# 프로젝트 주제: React와 오픈 API를 활용한 최신 웹 구조 습득 및 실습
## 컴퓨터 공학과 2016104135 - 유유진
React, Vue, Apollo, Graph.QL과 같은 최신 웹 기술을 사용하여 퍼포먼스도 뛰어나고 유연한 웹서비스를 구현해보도록 한다.
# 실행 방법
프로젝트 소스코드 폴더에서 **npm install .**로 모듈을 설치한 뒤 터미널에 **C:/`{프로젝트 위치}`> yarn dev**를 치면 실행된다.
*데이터를 제외하고 업로드해서 정상적인 작동은 하지 않습니다. 시연 때 보신 결과와 최종보고서 및 실행결과 사진을 확인해주세요.*
# 폴더 구성 설명
## 면담 보고서
각 월별 면담 보고서 (3~6)월 면담보고서가 들어 있습니다. 대면 면담을 한 것은 사진을 첨부했고, 서면으로 면담한 것은 사진이 첨부되어 있지 않습니다.
## 진행과제
프로젝트를 진행하기에 앞서 필요한 지식을 습득하기 위해 HTML + CSS + JavaScript를 공부, 실습하는 과제를 내주셨고 관련 과제 결과를 담았습니다.
## 진행 보고서
캡스톤 디자인 2를 진행하면서 제출한 보고서를 담았습니다. 주제(프로젝트 계획), 중간, 기말보고서로 나뉩니다.
## 프로젝트
프로젝트 하면서 작성한 소스코드를 모았습니다. 크롤러, 프로젝트, 실행결과 사진이 있고 추가로 웹페이지 기획안과 최종발표자료까지 함께 들어있습니다.
실행결과 사진은 탭 순서대로 구성되어 있습니다. 검색 결과는 1~5까지 있는데 검색 결과 Top3와 원형 그래프, 그 아래에 나오는 요일 별 수치를 보여주는 막대 그래프 캡처로 구성되어 있습니다.
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<title>회원가입</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$(function () {
$("#datepicker").datepicker();
//여기 #은 id인데 <p>Date: <input type="text" id="datepicker"></p> 이렇게 넣을때
//type은 text id를 datepicker로 사용
});
</script>
<style>
.ui-widget-header {background:navy; color:#fff;}
.btn{width: 100px; height:50px; background: none; border:none; padding:0;}
/*크기 설정 해주고 background, border, padding을 none, 0으로 초기화*/
button img{width:90%;}/*부모(button)가 할당해준 값에서 최대치를 사용하도록 설정해서 button도 설정이 들어가게*/
</style>
</head>
<body>
<form action="#" method="POST">
<!-- 전송될 무언가는 반드시 form으로 감싸져야한다.,
이게 어디로 전송될지 action 다음 스크립트 파일을 적어주면 된다.-->
<!--서버에 어떻게 전송할지에 대한 방법이 적혀야함(method) form옆에는 반드시 따라붙음 -->
<!-- post = 암호화, get 암호화x 주소표시줄에 같이 표시되서 묻어간다.-->
<!-- 개발자 도구에서 확인해보면 옆에 메소드가 붙어있음 회원가입은 암호화해야하니까 post-->
<fieldset>
<!--필드셋으로 묶고 legend 라벨링-->
<legend>필수 입력 사항</legend>
<p>
<label for="name">이름: </label>
<input id="name" type="text" name="username">
<!--name 데이터베이스의 필드(애트리뷰트)명이다.-->
<!-- 경우 프로그래머끼리 협의를 보거나 백앤드 작업자를 위해 비워두고 커스텀하게 한다.-->
</p>
<!--패러그래프: tab 역할을 한다.-->
<p>
<label for="email">이메일: </label>
<input id="email" type="email" name="useremail">
<!--input(사용자 입력 가능칸) label 붙어 있어야 한다 이때 적절한 id 주자 id==for 매치-->
<!-- input에는 type 있는데 type 설정해서 우리가 원하는 형태로 데이터를 받을 있음 -->
<!-- email type 걸면 브라우저가 이메일 형식 이외의 것을 차단함-->
</p>
<p>
<label for="password">비밀번호: </label>
<input id="password" type="password" name="userpassword">
<!--type password시에 가려서 나옴-->
</p>
</fieldset>
<fieldset>
<legend>선택 입력 사항</legend>
<p>
<label for="datepicker">생년월일: </label>
<input id="datepicker" type="date" name="userpassword">
<!--달력은 크롬이나 파폭에서는 type 구현이 되어있는데 이번엔 jQuery 라이브러리로 활용해보자-->
<!--라이브러리를 쓰면 어느 환경에서든 같은 달력을 있다. 기본을 쓰면 어느 브라우저는 나올 수도 있음-->
</p>
<p>
<span>거주지를 선택해주세요.</span>
<select name="user address"><!--미리 값이 있고 골라라 할때 사용-->
<option value ="" disabled>거주지를 선택해주세요</option> <!-- 경우 선택이 안댐-->
<option value="서울시">서울시</option>
<option value="경기도">경기도</option>
<option value="충청도">충청도</option>
<option value="제주도">제주도</option>
</select>
</p>
<p>
<span>취미는</span>
<label for="coding">코딩</label>
<input id="coding" type="checkbox" name="userinterest">
<label for="game">게임</label>
<input id="game" type="checkbox" name="userinterest">
<!--여기서 label input 연동을 안해두면 글씨를 클릭했을때는 체크가 되지 않는다.-->
</p>
<p>
<span>성별</span>
<label for="male">남성</label>
<input id="male" type="radio" value = "남성" name ="sex">
<label for="female">여성</label>
<input id="female" type="radio" value = "여성" name ="sex">
</p>
<p>
<span>기타 사항</span>
<textarea name ="usermessage"></textarea><!--크기가 자율적임-->
<textarea name ="usermessage" rows="10" cols="30"></textarea>
<!-- <textarea>(이곳)<textarea> 엔터가 들어가면 공백이 들어가보임, 들어가면 안댐-->
<!--만약 사이에 텍스트가 들어가면 스크롤로 자동 전환 된다.-->
<textarea name ="contract" readonly ="readonly" rows="10" cols="30">아파치 하둡은 대량의 자료를 처리할 있는 컴퓨터 클러스터에서 동작하는 분산 응용 프로그램을 지원하는 프리웨어 자바 소프트웨어 프레임워크이다. 원래 너치의 분산 처리를 지원하기 위해 개발된 것으로, 아파치 루씬의 하부 프로젝트이다. 위키백과 작성 언어: 자바 최초 출시일: 2006 4 1 개발자: 아파치 소프트웨어 재단 라이선스: 아파치 라이선스 2.0 안정화 버전: 3.0.0 / 2017 12 13 종류: 분산 파일 시스템</textarea>
<!--위의 readonly 옵션을 주면 수정 불가. 저렇게 value값이 같을 경우 readonly 생략가능-->
</p>
</fieldset>
<input type="submit" value="회원 가입" /> <!-- 전송해주는 형태 + value -> 안에 들어갈 -->
<input type="reset" value="재작성" />
<input type="button" value="뒤로 가기" onclick="history.go(-1)"/>
<!-- input value 있는 값이 나오고 button 가운뎃값이 나온다.-->
<!--
<hr/>
<input class ="btn" type="image" src="send.png" alt="send"/>
<button class ="btn" type="submit"><img src="send.png" alt="send"></button>-->
<!-- input button 이미지를 넣는 방식 개의 이미지가 다르다. button 무조건
테두리(border, background) 생기는데 이때 필요없을 경우css에서 없애야 한다.-->
</form>
<!--<fieldset>
<legend>CSS Test</legend>
<p style="color: blue">Lorem ipsum dolor.</p>-->
<!--Inline Style Sheet: 속성과 값만 들어감 꾸미는데 한계가 있고, 재사용 불가-->
<!--Internal Style Sheet: <style>(여기)</style> 작성하는 방식
<style>
h1{
color : blue;
}
</style>
이러면 문서 안의 h1의 모든 요소가 파란색 글자를 가지게 된다.
보통 <head></head>사시에 넣으나 html 문서의 어디에 넣어도 적용이 잘 되며, 이 방법은 html 문서 안의
여러 요소를 한번에 꾸밀 수 있다는 장점이 있으나, 또 다른 html 문서에는 적용할 수 없다는 단점이 있다.
-->
<!--Linking Style Sheet: 별도로 CSS 파일을 만들고 html 문서와 연결하는 방법이다. 예를 들어 h1 요소의 글자를
빨간색으로 하고 싶다면, 다음의; 내용으로 style.css 파일을 만든다
style.css--------------
| h1{ |
| color: red; |
| } |
-----------------------.
이후 적용을 원하는 html 문서에
<link rel="stylesheet" href="style.css">
코드를 추가한다. 경로는 html과 같이 있을 경우 위처럼 쓰고
문서가 있는 폴더에 css 폴더가 있고, 그 안에 style.css 파일이 있다면 다음과 같이 해야한다.
<link rel="stylesheet" href="css/style.css">
-->
<!--</fieldset>-->
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<title>회원가입</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$(function () {
$("#datepicker").datepicker();
//여기 #은 id인데 <p>Date: <input type="text" id="datepicker"></p> 이렇게 넣을때
//type은 text id를 datepicker로 사용
});
</script>
<style>
.ui-widget-header {background:navy; color:#fff;}
.btn{width: 100px; height:50px; background: none; border:none; padding:0;}
/*크기 설정 해주고 background, border, padding을 none, 0으로 초기화*/
button img{width:90%;}/*부모(button)가 할당해준 값에서 최대치를 사용하도록 설정해서 button도 설정이 들어가게*/
</style>
</head>
<body>
<form action="#" method="POST">
<!-- 전송될 무언가는 반드시 form으로 감싸져야한다.,
이게 어디로 전송될지 action 다음 스크립트 파일을 적어주면 된다.-->
<!--서버에 어떻게 전송할지에 대한 방법이 적혀야함(method) form옆에는 반드시 따라붙음 -->
<!-- post = 암호화, get 암호화x 주소표시줄에 같이 표시되서 묻어간다.-->
<!-- 개발자 도구에서 확인해보면 옆에 메소드가 붙어있음 회원가입은 암호화해야하니까 post-->
<fieldset>
<!--필드셋으로 묶고 legend 라벨링-->
<legend>필수 입력 사항</legend>
<p>
<label for="name">이름: </label>
<input id="name" type="text" name="username">
<!--name 데이터베이스의 필드(애트리뷰트)명이다.-->
<!-- 경우 프로그래머끼리 협의를 보거나 백앤드 작업자를 위해 비워두고 커스텀하게 한다.-->
</p>
<!--패러그래프: tab 역할을 한다.-->
<p>
<label for="email">이메일: </label>
<input id="email" type="email" name="useremail">
<!--input(사용자 입력 가능칸) label 붙어 있어야 한다 이때 적절한 id 주자 id==for 매치-->
<!-- input에는 type 있는데 type 설정해서 우리가 원하는 형태로 데이터를 받을 있음 -->
<!-- email type 걸면 브라우저가 이메일 형식 이외의 것을 차단함-->
</p>
<p>
<label for="password">비밀번호: </label>
<input id="password" type="password" name="userpassword">
<!--type password시에 가려서 나옴-->
</p>
</fieldset>
<fieldset>
<legend>선택 입력 사항</legend>
<p>
<label for="datepicker">생년월일: </label>
<input id="datepicker" type="date" name="userpassword">
<!--달력은 크롬이나 파폭에서는 type 구현이 되어있는데 이번엔 jQuery 라이브러리로 활용해보자-->
<!--라이브러리를 쓰면 어느 환경에서든 같은 달력을 있다. 기본을 쓰면 어느 브라우저는 나올 수도 있음-->
</p>
<p>
<span>거주지를 선택해주세요.</span>
<select name="user address"><!--미리 값이 있고 골라라 할때 사용-->
<option value ="" disabled>거주지를 선택해주세요</option> <!-- 경우 선택이 안댐-->
<option value="서울시">서울시</option>
<option value="경기도">경기도</option>
<option value="충청도">충청도</option>
<option value="제주도">제주도</option>
</select>
</p>
<p>
<span>취미는</span>
<label for="coding">코딩</label>
<input id="coding" type="checkbox" name="userinterest">
<label for="game">게임</label>
<input id="game" type="checkbox" name="userinterest">
<!--여기서 label input 연동을 안해두면 글씨를 클릭했을때는 체크가 되지 않는다.-->
</p>
<p>
<span>성별</span>
<label for="male">남성</label>
<input id="male" type="radio" value = "남성" name ="sex">
<label for="female">여성</label>
<input id="female" type="radio" value = "여성" name ="sex">
</p>
<p>
<span>기타 사항</span>
<textarea name ="usermessage"></textarea><!--크기가 자율적임-->
<textarea name ="usermessage" rows="10" cols="30"></textarea>
<!-- <textarea>(이곳)<textarea> 엔터가 들어가면 공백이 들어가보임, 들어가면 안댐-->
<!--만약 사이에 텍스트가 들어가면 스크롤로 자동 전환 된다.-->
<textarea name ="contract" readonly ="readonly" rows="10" cols="30">아파치 하둡은 대량의 자료를 처리할 있는 컴퓨터 클러스터에서 동작하는 분산 응용 프로그램을 지원하는 프리웨어 자바 소프트웨어 프레임워크이다. 원래 너치의 분산 처리를 지원하기 위해 개발된 것으로, 아파치 루씬의 하부 프로젝트이다. 위키백과 작성 언어: 자바 최초 출시일: 2006 4 1 개발자: 아파치 소프트웨어 재단 라이선스: 아파치 라이선스 2.0 안정화 버전: 3.0.0 / 2017 12 13 종류: 분산 파일 시스템</textarea>
<!--위의 readonly 옵션을 주면 수정 불가. 저렇게 value값이 같을 경우 readonly 생략가능-->
</p>
</fieldset>
<input type="submit" value="회원 가입" /> <!-- 전송해주는 형태 + value -> 안에 들어갈 -->
<input type="reset" value="재작성" />
<input type="button" value="뒤로 가기" onclick="history.go(-1)"/>
<!-- input value 있는 값이 나오고 button 가운뎃값이 나온다.-->
<!--
<hr/>
<input class ="btn" type="image" src="send.png" alt="send"/>
<button class ="btn" type="submit"><img src="send.png" alt="send"></button>-->
<!-- input button 이미지를 넣는 방식 개의 이미지가 다르다. button 무조건
테두리(border, background) 생기는데 이때 필요없을 경우css에서 없애야 한다.-->
</form>
<!--<fieldset>
<legend>CSS Test</legend>
<p style="color: blue">Lorem ipsum dolor.</p>-->
<!--Inline Style Sheet: 속성과 값만 들어감 꾸미는데 한계가 있고, 재사용 불가-->
<!--Internal Style Sheet: <style>(여기)</style> 작성하는 방식
<style>
h1{
color : blue;
}
</style>
이러면 문서 안의 h1의 모든 요소가 파란색 글자를 가지게 된다.
보통 <head></head>사시에 넣으나 html 문서의 어디에 넣어도 적용이 잘 되며, 이 방법은 html 문서 안의
여러 요소를 한번에 꾸밀 수 있다는 장점이 있으나, 또 다른 html 문서에는 적용할 수 없다는 단점이 있다.
-->
<!--Linking Style Sheet: 별도로 CSS 파일을 만들고 html 문서와 연결하는 방법이다. 예를 들어 h1 요소의 글자를
빨간색으로 하고 싶다면, 다음의; 내용으로 style.css 파일을 만든다
style.css--------------
| h1{ |
| color: red; |
| } |
-----------------------.
이후 적용을 원하는 html 문서에
<link rel="stylesheet" href="style.css">
코드를 추가한다. 경로는 html과 같이 있을 경우 위처럼 쓰고
문서가 있는 폴더에 css 폴더가 있고, 그 안에 style.css 파일이 있다면 다음과 같이 해야한다.
<link rel="stylesheet" href="css/style.css">
-->
<!--</fieldset>-->
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="ko">
<head>
<style type="text/css">
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: "맑은 고딕";
font-size: 0.75em;
color: #333;
}
#login-form {
width: 250px;
margin: 100px auto;
border: 10px solid skyblue;
border-radius: 5px;
padding: 15px;
}
#login-form label {
display: block;
}
#login-form label {
margin-top: 10px;
}
#login-form input {
margin-top: 5px;
}
/* 애트리뷰트 선택자 */
#login-form input[type='image'] {
margin: 0px auto;
width: 90px;
height: 40px;
}
#login-form input[type='button'] {
background: url( "images/join.png" ) no-repeat;
background-position: center center;
background-size: contain;
border: none;
width: 90px;
height: 50px;
}
</style>
</head>
<body>
<form id="login-form" action="#" method="POST">
<label class="Legend" for="id">아이디</label>
<input id="id" type="text" maxlength="20" name="userid" />
<label class="Legend" for="password">패스워드</label>
<input id="password" type="password" maxlength="20" name="userpassword"/>
</br></br>
<input type="image" src="images/login_btn.png" value="로그인">
<input type="button" onclick="location.href='join.html'"/>
</form>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<title>회원가입</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$(function () {
$("#datepicker").datepicker();
});
</script>
<style>
body{
background: #34495e;
margin: 0;
}
.box{
width: 300px;
padding: 40px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
background: #191919;
text-align: center;
}
.box h1{
color: white;
text-transform: uppercase;
font-weight: 500;
}
.box input[type="text"],.box input[type="password"], .box input[type="email"]{
border:0;
background: none;
margin: 20px auto;
text-align: center;
border: 2px solid #3498db;
padding: 14px 10px;
width: 200px;
outline: none;
color: white;
border-radius: 24px;
transition: 0.25s;
cursor: pointer;
}
.box input[type="text"]:focus,.box input[type="password"]:focus, .box input[type="email"]:focus{
width: 280px;
border-color:#2ecc71;
}
.box input[type="submit"]:hover, .box input[type="button"]:hover, .box input[type="reset"]:hover{
background:#2ecc71;
}
.ui-widget-header {background:navy; color:#fff;}
input[class="btn"]{
border: none;
color: white;
font-family: NanumSquareWeb;
font-size: large;
font-weight: bold;
text-align: center;
border-radius: 20px;
width: 32%;
height: 40px;
float: left;
}
input[id="submit"]{
background-color: #191919;
border: 2px solid #3498db;
}
input[id="reset"]{
background-color: #191919;
border: 2px solid #3498db;
}
input[id="back"]{
background-color: #191919;
border: 2px solid #3498db;
}
button img{width:90%;}
@media(max-width: 577px ){
input[class='btn'] {
width: 100%;
}
}
</style>
</head>
<body>
<form class="box" action="#" method="POST">
<h1>필수 입력 사항</h1>
<p>
<input id="name" type="text" name="username" placeholder="Name">
</p>
<p>
<input id="password" type="password" name="userpassword" placeholder="Password">
</p>
<p>
<input id="email" type="email" name="useremail" placeholder="Email">
</p>
<input class="btn" id="submit" type="submit" background-color="" value="회원 가입" /> <!-- 전송해주는 형태 + value -> 안에 들어갈 값-->
<input class="btn" id="reset" type="reset" value="재작성" />
<input class="btn" id="back" type="button" value="뒤로 가기" onclick="history.go(-1)"/>
</form>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1" />
<style type="text/css">
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/*모든 element에 적용되는 것 */
@font-face {
font-family: NanumSquareWeb;
src: local(NanumSquareR),
local(NanumSquare),
url(NanumSquareR.eot?#iefix) format('embedded-opentype'),
url(NanumSquareR.woff) format('woff'),
url(NanumSquareR.ttf) format('truetype');
font-style: normal;
font-weight: normal;
unicode-range: U+0-10FFFF;
}
h1 {
font-family: NanumSquareWeb, sans-serif;
}
body {
font-family: "맑은 고딕";
font-size: 0.75em;
color: #333;
}
#login-form {
width: 250px;
height: 250px;
margin: 100px auto;
border: 10px solid skyblue;
border-radius: 5px;
padding: 15px;
}
#login-form label {
display: block;
}
#login-form label {
margin-top: 10px;
}
#login-form input {
margin-top: 5px;
}
/* 애트리뷰트 선택자 */
#login-form input[type='image'] {
margin: 0px auto;
background-size: cover;
width: 90px;
height: 40px;
}
#login-form input[id='Lbutton'] {
background-color: orange;
border: none;
color: white;
font-family: NanumSquareWeb;
font-size: large;
font-weight: bold;
text-align: center;
border-radius: 20px;
width: 100%;
height: 40px;
float: left;
}
#login-form input[id='Jbutton'] {
background-color: red;
font-size: large;
font-weight: bold;
text-align: center;
font-family: NanumSquareWeb;
border-radius: 20px;
border: none;
color: white;
width: 100%;
height: 40px;
float: left;
}
@media(min-width: 577px ){
#login-form {
height: 200px;
}
#login-form input[id='Jbutton'] {
width: 50%;
}
#login-form input[id='Lbutton'] {
width: 50%;
}
}
</style>
</head>
<body>
<form id="login-form" action="#" method="POST">
<label class="Legend" for="id">아이디</label>
<input id="id" type="text" maxlength="20" name="userid" />
<label class="Legend" for="password">패스워드</label>
<input id="password" type="password" maxlength="20" name="userpassword" />
</br></br>
<div class="btn">
<input id="Lbutton" type="button" name="login" value="Login">
<input id="Jbutton" type="button" name="join" onclick="location.href='join.html'" value="Join">
</div>
</form>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<title>회원가입</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$(function () {
$("#datepicker").datepicker();
});
</script>
<style>
body {
background: #34495e;
margin: 0;
}
.box {
width: 300px;
padding: 40px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #191919;
text-align: center;
}
.box h1 {
color: white;
text-transform: uppercase;
font-weight: 500;
}
.box input[type="text"],
.box input[type="password"],
.box input[type="email"] {
border: 0;
background: none;
margin: 20px auto;
text-align: center;
border: 2px solid #3498db;
padding: 14px 10px;
width: 200px;
outline: none;
color: white;
border-radius: 24px;
transition: 0.25s;
cursor: pointer;
}
.box input[type="text"]:focus,
.box input[type="password"]:focus,
.box input[type="email"]:focus {
width: 280px;
border-color: #2ecc71;
}
.box input[type="submit"]:hover,
.box input[type="button"]:hover,
.box input[type="reset"]:hover {
background: #2ecc71;
}
.ui-widget-header {
background: navy;
color: #fff;
}
input[class="btn"] {
border: none;
color: white;
font-family: NanumSquareWeb;
font-size: large;
font-weight: bold;
text-align: center;
border-radius: 20px;
width: 32%;
height: 40px;
float: left;
}
input[id="submit"] {
background-color: #191919;
border: 2px solid #3498db;
}
input[id="reset"] {
background-color: #191919;
border: 2px solid #3498db;
}
input[id="back"] {
background-color: #191919;
border: 2px solid #3498db;
}
button img {
width: 90%;
}
@media(max-width: 577px) {
input[class='btn'] {
width: 100%;
}
}
</style>
<span id="alert-success" style="display: none;">비밀번호가 일치합니다.</span>
<span id="alert-danger" style="display: none; color: #ffffff; font-weight: bold; ">비밀번호가 일치하지 않습니다.</span>
</head>
<body>
<form class="box" action="#" method="POST" onsubmit="return checkAll(this)">
<h1>필수 입력 사항</h1>
<input id="id" type="text" name="userid" placeholder="ID" required>
<input id="name" type="text" name="username" placeholder="Name" required>
<input class="pw" id="password" type="password" name="userpassword" placeholder="Password" required>
<input class="pw" id="password_check" type="password" name="userpassword_check" placeholder="Password Check" required>
<input id="email" type="email" name="useremail" placeholder="Email" required>
<input class="btn" id="submit" type="submit" background-color="" value="회원 가입" />
<!-- 전송해주는 형태 + value -> 안에 들어갈 값-->
<input class="btn" id="reset" type="reset" value="재작성" />
<input class="btn" id="back" type="button" value="뒤로 가기" onclick="history.go(-1)" />
</form>
<script language="javascript">
function checkAll(form) {
if (!checkUserId(form.userid.value)) {
return false;
}
if (!checkPassword(form.userid.value, form.userpassword.value, form.userpassword_check.value)) {
return false;
}
if (!checkMail(form.useremail.value)) {
return false;
}
return true;
}
function checkUserId(id) {
//함수 매개변수로 넘어오는 값은 input 태그에 들어가는 값.
//Id가 입력되었는지 확인하기
if (!checkExistData(id, "아이디를"))
return false;
var idRegExp = /^[a-zA-z0-9]{5,15}$/; //아이디 유효성 검사
if (!idRegExp.test(id)) {
alert("아이디는 영문 대소문자와 숫자 5~15자리로 입력해야합니다!");
form.userid.value = "";
document.getElementById(userid).focus();
return false;
}
return true; //확인이 완료되었을 때
}
function checkPassword(id, password1, password2) {
//비밀번호가 입력되었는지 확인하기
if (!checkExistData(password1, "비밀번호를"))
return false;
//비밀번호 확인이 입력되었는지 확인하기
if (!checkExistData(password2, "비밀번호 확인을"))
return false;
var swit = new Boolean(true);
var password1RegExp = /^[a-zA-z0-9]{4,12}$/; //비밀번호 유효성 검사
if (!password1RegExp.test(password1)) {
alert("비밀번호는 영문 대소문자와 숫자 4~12자리로 입력해야합니다!");
document.getElementById(userpassword).focus();
swit = false;
}
//비밀번호와 비밀번호 확인이 맞지 않다면..
if (password1 != password2) {
alert("두 비밀번호가 맞지 않습니다.");
document.getElementById(userpassword_check).focus();
swit = false;
}
//아이디와 비밀번호가 같을 때..
if (id == password1) {
alert("아이디와 비밀번호는 같을 수 없습니다!");
document.getElementById(userid).focus();
document.getElementById(userpassword).focus();
swit = false;
}
if(swit)
{
return true;
}
else{
form.userpassword.value = "";
form.userpassword_check.value = "";
return false;
}
}
function checkMail(email) {
//mail이 입력되었는지 확인하기
if (!checkExistData(mail, "이메일을"))
return false;
var emailRegExp = /^[A-Za-z0-9_]+[A-Za-z0-9]*[@]{1}[A-Za-z0-9]+[A-Za-z0-9]*[.]{1}[A-Za-z]{1,3}$/;
if (!emailRegExp.test(mail)) {
alert("이메일 형식이 올바르지 않습니다!");
form.useremail.value = "";
document.getElementById(useremail).focus();
return false;
}
return true; //확인이 완료되었을 때
}
// 공백확인 함수
function checkExistData(value, dataName) {
if (value == "") {
alert(dataName + " 입력해주세요!");
return false;
}
return true;
}
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<title>회원가입</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$(function () {
$("#datepicker").datepicker();
});
</script>
<style>
body {
background: #34495e;
margin: 0;
}
.box {
width: 300px;
padding: 40px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #191919;
text-align: center;
}
.box h1 {
color: white;
text-transform: uppercase;
font-weight: 500;
}
.box input[type="text"],
.box input[type="password"],
.box input[type="email"] {
border: 0;
background: none;
margin: 20px auto;
text-align: center;
border: 2px solid #3498db;
padding: 14px 10px;
width: 200px;
outline: none;
color: white;
border-radius: 24px;
transition: 0.25s;
cursor: pointer;
}
.box input[type="text"]:focus,
.box input[type="password"]:focus,
.box input[type="email"]:focus {
width: 280px;
border-color: #2ecc71;
}
.box input[type="submit"]:hover,
.box input[type="button"]:hover,
.box input[type="reset"]:hover {
background: #2ecc71;
}
.ui-widget-header {
background: navy;
color: #fff;
}
input[class="btn"] {
border: none;
color: white;
font-family: NanumSquareWeb;
font-size: large;
font-weight: bold;
text-align: center;
border-radius: 20px;
width: 32%;
height: 40px;
float: left;
}
input[id="submit"] {
background-color: #191919;
border: 2px solid #3498db;
}
input[id="reset"] {
background-color: #191919;
border: 2px solid #3498db;
}
input[id="back"] {
background-color: #191919;
border: 2px solid #3498db;
}
button img {
width: 90%;
}
@media(max-width: 577px) {
input[class='btn'] {
width: 100%;
}
}
</style>
<span id="alert-success" style="display: none;">비밀번호가 일치합니다.</span>
<span id="alert-danger" style="display: none; color: #ffffff; font-weight: bold; ">비밀번호가 일치하지 않습니다.</span>
</head>
<body>
<form class="box" action="#" method="POST">
<div class="Join_form">
<h1>필수 입력 사항</h1>
<div class="div_id" id="div_id">
<input id="id" class="id" type="text" name="userid" placeholder="ID" required>
<div class="div_id_text" id="div_id_text"></div>
</div>
<div class="div_name" id="div_name">
<input id="name" type="text" name="username" placeholder="Name" required>
</div>
<div class="div_pw" id="div_pw">
<input class="pw1" id="password" type="password" name="userpassword" placeholder="Password" required>
<div class="div_pw_text" id="div_pw_text"></div>
</div>
<div class="div_check" id="div_check">
<input class="pw2" id="password_check" type="password" name="userpassword_check"
placeholder="Password Check" required>
<div class="div_check_text" id="div_check_text"></div>
</div>
<div class="div_email" id="div_email">
<input id="email" class="mail" type="email" name="useremail" placeholder="Email" required>
<div class="div_email_text" id="div_email_text"></div>
</div>
<div class="div_btn">
<input class="btn" id="submit" type="submit" background-color="" value="회원 가입" />
<!-- 전송해주는 형태 + value -> 안에 들어갈 값-->
<input class="btn" id="reset" type="reset" value="재작성" />
<input class="btn" id="back" type="button" value="뒤로 가기" onclick="history.go(-1)" />
</div>
</div>
</form>
<script>
var email = $('.mail');
var id = $('.id');
var password = $('.pw1');
var password_check = $('.pw2');
var idRegExp = /^[a-zA-z0-9]{5,15}$/; //아이디 유효성 검사
var emailRegExp = /^[A-Za-z0-9_]+[A-Za-z0-9]*[@]{1}[A-Za-z0-9]+[A-Za-z0-9]*[.]{1}[A-Za-z]{1,3}$/;
email.blur(function () {
if (!emailRegExp.test(email.val())) {
$("input[name='useremail']").css('border-color', '#ff0000');
$("input[name='useremail']").focus();
}
else {
setTimeout(function () { $("input[name='useremail']").css('border-color', '#3498db'); }, 500);
}
});
id.blur(function () {
if (!idRegExp.test(id.val())) {
$("#div_id_text").text("아이디는 5~15자의 영숫자로 만들어주세요.");
$("#div_id_text").css('color', 'red');
$("#div_id_text").css('font-size', '1.5vw');
}
else {
$("#div_id_text").text("");
}
});
password_check.blur(function () {
if (password.val() != '' && password_check.val() != '') {
if (password.val() != password_check.val()) {
$("#div_pw_text").text("비밀번호가 일치하지 않습니다.");
$("#div_pw_text").css('color', 'red');
$("#div_pw_text").css('font-size', '1.5vw');
$("#div_check_text").text("비밀번호가 일치하지 않습니다.");
$("#div_check_text").css('color', 'red');
$("#div_check_text").css('font-size', '1.5vw');
$("input[name='userpassword']").css('border-color', '#ff0000');
$("input[name='userpassword_check']").css('border-color', '#ff0000');
}
else {
$("#div_pw_text").text('');
$("#div_check_text").text('');
setTimeout(function () { $("input[name='userpassword']").css('border-color', '#3498db'); }, 500);
setTimeout(function () { $("input[name='userpassword_check']").css('border-color', '#3498db'); }, 500);
}
}
});
password.blur(function () {
if (password.val() != '' && password_check.val() != '') {
if (password.val() != password_check.val()) {
$("#div_pw_text").text("비밀번호가 일치하지 않습니다.");
$("#div_pw_text").css('color', 'red');
$("#div_pw_text").css('font-size', '1.5vw');
$("#div_check_text").text("비밀번호가 일치하지 않습니다.");
$("#div_check_text").css('color', 'red');
$("#div_check_text").css('font-size', '1.5vw');
$("input[name='userpassword']").css('border-color', '#ff0000');
$("input[name='userpassword_check']").css('border-color', '#ff0000');
}
else {
$("#div_pw_text").text('');
$("#div_check_text").text('');
setTimeout(function () { $("input[name='userpassword']").css('border-color', '#3498db'); }, 500);
setTimeout(function () { $("input[name='userpassword_check']").css('border-color', '#3498db'); }, 500);
}
}
});
</script>
</body>
</html>
\ No newline at end of file
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<file url="file://$PROJECT_DIR$" libraries="{Node.js Core}" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/df.iml" filepath="$PROJECT_DIR$/.idea/df.iml" />
</modules>
</component>
</project>
\ No newline at end of file
const axios = require('axios');
const mysql = require('mysql2');
const connection = mysql.createConnection({
host: 'localhost',
port: '3307',
user: 'root',
password: 'yj',
database: 'projectdf',
}).promise();
const GetItem = async (filter, page) => {
// filter = 에픽(204), 신화(207)
const response = await axios({
method: 'post',
url: 'http://df.nexon.com/FRM/info/equipment_search_api.php',
headers: {
'Accept': 'application/json, text/javascript, */*; q=0.01',
'X-Requested-With': 'XMLHttpRequest',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Referer': 'http://df.nexon.com/df/info/equipment/search?page=1&is_limit=&filter=207&max=100&min=100&level=Y&order_name=level&order_type=asc',
},
data: `mode=search&data[keyword]=&data[filter]=${filter}&data[level]=Y&data[min]=100&data[max]=100&data[setitem]=N&data[order_name]=level&data[order_type]=asc&page=${page}`,
});
return response.data.data.items;
};
(async () => {
const ex = /.운디네|.샐러맨더|.실프|포용의|맹렬히|휘감는|잔잔한|신록의 숨결|에너지 분배 제어기|전자기 진공관|제어 회로|무의식 : .|무형 : .|환영 : .|원초의 꿈.|진 :.|.결투장|퍼펙트 컨트롤|불타오르는 푸른 마력|암살자의 비수|마더 오브 네이쳐|거미 여왕의 목소리|풀 가드 네클레스|선지자의 목걸이|생멸 관장자의 팔찌|독을 머금은 가시장갑|할기의 링|올 엘리멘탈 크리스탈|웨슬리의 전술지휘봉|볼 오브 러데이니언|금지된 계약의 서|응축된 마력의 소용돌이|청면수라의 가면|얼어붙은 숨결의 결정|뒤틀린 이계의 마석|영광의 보석|적귀의 차원석|패스트퓨처 이어링|무념의 의식|무의식의 꽃|무형의 절개|무언의 죄악|무아의 고리/ig;
const filter_list = ['204', '207'];
for (const filter of filter_list) {
let page = 1;
while (true) {
const data = await GetItem(filter, page);
for (const item of data) {
try {
if (item.name.match(ex) == null) {
await connection.query('INSERT INTO `item_exception` SET ?', {
itemId: item.itemId,
name: item.name,
type: (filter === '204') ? 'epic' : 'myth',
});
}
} catch (e) {}
}
if (data.length === 0) {
break;
}
page++;
}
}
await connection.close();
})();
const axios = require('axios');
const crypto = require('crypto');
const mysql = require('mysql2');
const moment = require('moment');
const cron = require('node-cron');
const scheduler = require('node-schedule');
var now = new Date();
require('moment-timezone');
moment.tz.setDefault("Asia/Seoul");
const connection = mysql.createConnection({
host: 'localhost',
port: '3307',
user: 'root',
password: 'yj',
database: 'projectdf',
}).promise();
const GetItemDrop = async (itemId) => {
const response = await axios({
method: 'post',
url: `http://df.nexon.com/FRM/game/epic_drop.php?id=${itemId}`,
headers: {
'Accept': 'application/json, text/javascript, */*; q=0.01',
'X-Requested-With': 'XMLHttpRequest',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36',
'Referer': `http://df.nexon.com/df/info/equipment/view?id=${itemId}&page=3&is_limit=&filter=204&max=100&min=100&level=Y&order_name=level&order_type=asc`,
},
});
return response.data;
};
let job = scheduler.scheduleJob('*/15 * * * * *',function(){
var dateT = moment().format('YYYY-MM-DD HH:mm:ss');
console.log("Start "+dateT);
(async () => {
const [item_list] = await connection.query('SELECT * FROM `item_exception`');
for (const item of item_list) {
const data = await GetItemDrop(item.itemId);
for (const drop of data) {
const input = {
itemId: drop.item_no,
channel_name: drop.channel_name,
channel_number: drop.channel_number,
dungeon: drop.dungeon,
droped_at: moment.unix(drop.time).format('YYYY-MM-DD HH:mm:ss'),
};
input['hash'] = crypto.createHash('md5').update(JSON.stringify(input)).digest('hex');
try {
await connection.query('INSERT INTO `item_drop_exception` SET ?', input);
} catch (e) {}
}
}
var dateT2 = moment().format('YYYY-MM-DD HH:mm:ss');
console.log(dateT+" insert DB Done in" + dateT2);
})();
});
// await connection.close();-> 크론 작업을 돌리기 때문에 제외
// cron.schedule('*/15 * * * * *', function () {
// var dateT = moment().format('YYYY-MM-DD HH:mm:ss');
// console.log("Start "+dateT);
// const connection = mysql.createConnection({
// host: 'localhost',
// port: '3307',
// user: 'root',
// password: 'yj',
// database: 'projectdf',
// }).promise();
// const GetItemDrop = async (itemId) => {
// const response = await axios({
// method: 'post',
// url: `http://df.nexon.com/FRM/game/epic_drop.php?id=${itemId}`,
// headers: {
// 'Accept': 'application/json, text/javascript, */*; q=0.01',
// 'X-Requested-With': 'XMLHttpRequest',
// 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36',
// 'Referer': `http://df.nexon.com/df/info/equipment/view?id=${itemId}&page=3&is_limit=&filter=204&max=100&min=100&level=Y&order_name=level&order_type=asc`,
// },
// });
// return response.data;
// };
// (async () => {
// const [item_list] = await connection.query('SELECT * FROM `item_exception`');
// for (const item of item_list) {
// const data = await GetItemDrop(item.itemId);
// for (const drop of data) {
// const input = {
// itemId: drop.item_no,
// channel_name: drop.channel_name,
// channel_number: drop.channel_number,
// dungeon: drop.dungeon,
// droped_at: moment.unix(drop.time).format('YYYY-MM-DD HH:mm:ss'),
// };
// input['hash'] = crypto.createHash('md5').update(JSON.stringify(input)).digest('hex');
// try {
// await connection.query('INSERT INTO `item_drop_exception` SET ?', input);
// } catch (e) {}
// }
// }
// var dateT2 = moment().format('YYYY-MM-DD HH:mm:ss');
// console.log("insert DB Done " + dateT2);
// await connection.close();
// })();
// dateT = moment().format('YYYY-MM-DD HH:mm:ss');
// console.log("done "+dateT);
// });
{
"name": "df",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"ansicolors": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz",
"integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk="
},
"axios": {
"version": "0.19.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz",
"integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
"requires": {
"follow-redirects": "1.5.10"
}
},
"cardinal": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz",
"integrity": "sha1-fMEFXYItISlU0HsIXeolHMe8VQU=",
"requires": {
"ansicolors": "~0.3.2",
"redeyed": "~2.1.0"
}
},
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"denque": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz",
"integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ=="
},
"esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"requires": {
"debug": "=3.1.0"
}
},
"generate-function": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
"integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
"requires": {
"is-property": "^1.0.2"
}
},
"iconv-lite": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.1.tgz",
"integrity": "sha512-ONHr16SQvKZNSqjQT9gy5z24Jw+uqfO02/ngBSBoqChZ+W8qXX7GPRa1RoUnzGADw8K63R1BXUMzarCVQBpY8Q==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"is-property": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
"integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ="
},
"long": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
},
"lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
"integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
"requires": {
"yallist": "^3.0.2"
}
},
"moment": {
"version": "2.25.3",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.25.3.tgz",
"integrity": "sha512-PuYv0PHxZvzc15Sp8ybUCoQ+xpyPWvjOuK72a5ovzp2LI32rJXOiIfyoFoYvG3s6EwwrdkMyWuRiEHSZRLJNdg=="
},
"moment-timezone": {
"version": "0.5.31",
"resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.31.tgz",
"integrity": "sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA==",
"requires": {
"moment": ">= 2.9.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"mysql2": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.1.0.tgz",
"integrity": "sha512-9kGVyi930rG2KaHrz3sHwtc6K+GY9d8wWk1XRSYxQiunvGcn4DwuZxOwmK11ftuhhwrYDwGx9Ta4VBwznJn36A==",
"requires": {
"cardinal": "^2.1.1",
"denque": "^1.4.1",
"generate-function": "^2.3.1",
"iconv-lite": "^0.5.0",
"long": "^4.0.0",
"lru-cache": "^5.1.1",
"named-placeholders": "^1.1.2",
"seq-queue": "^0.0.5",
"sqlstring": "^2.3.1"
}
},
"named-placeholders": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.2.tgz",
"integrity": "sha512-wiFWqxoLL3PGVReSZpjLVxyJ1bRqe+KKJVbr4hGs1KWfTZTQyezHFBbuKj9hsizHyGV2ne7EMjHdxEGAybD5SA==",
"requires": {
"lru-cache": "^4.1.3"
},
"dependencies": {
"lru-cache": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
"requires": {
"pseudomap": "^1.0.2",
"yallist": "^2.1.2"
}
},
"yallist": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
}
}
},
"node-cron": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/node-cron/-/node-cron-2.0.3.tgz",
"integrity": "sha512-eJI+QitXlwcgiZwNNSRbqsjeZMp5shyajMR81RZCqeW0ZDEj4zU9tpd4nTh/1JsBiKbF8d08FCewiipDmVIYjg==",
"requires": {
"opencollective-postinstall": "^2.0.0",
"tz-offset": "0.0.1"
}
},
"opencollective-postinstall": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz",
"integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw=="
},
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
},
"redeyed": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz",
"integrity": "sha1-iYS1gV2ZyyIEacme7v/jiRPmzAs=",
"requires": {
"esprima": "~4.0.0"
}
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"seq-queue": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz",
"integrity": "sha1-1WgS4cAXpuTnw+Ojeh2m143TyT4="
},
"sqlstring": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.2.tgz",
"integrity": "sha512-vF4ZbYdKS8OnoJAWBmMxCQDkiEBkGQYU7UZPtL8flbDRSNkhaXvRJ279ZtI6M+zDaQovVU4tuRgzK5fVhvFAhg=="
},
"tz-offset": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/tz-offset/-/tz-offset-0.0.1.tgz",
"integrity": "sha512-kMBmblijHJXyOpKzgDhKx9INYU4u4E1RPMB0HqmKSgWG8vEcf3exEfLh4FFfzd3xdQOw9EuIy/cP0akY6rHopQ=="
},
"yallist": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
}
}
}
{
"name": "df",
"version": "1.0.0",
"description": "",
"main": "crawl.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^0.19.2",
"moment": "^2.25.3",
"moment-timezone": "^0.5.31",
"mysql2": "^2.1.0",
"node-cron": "^2.0.3"
}
}
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `yarn start`
Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.<br />
You will also see any lint errors in the console.
### `yarn test`
Launches the test runner in the interactive watch mode.<br />
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `yarn build`
Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.<br />
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `yarn eject`
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
### Analyzing the Bundle Size
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
### Making a Progressive Web App
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
### Advanced Configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
### Deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
### `yarn build` fails to minify
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
'use strict';
const fs = require('fs');
const path = require('path');
const paths = require('./paths');
// Make sure that including paths.js after env.js will read .env variables.
delete require.cache[require.resolve('./paths')];
const NODE_ENV = process.env.NODE_ENV;
if (!NODE_ENV) {
throw new Error(
'The NODE_ENV environment variable is required but was not specified.'
);
}
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
const dotenvFiles = [
`${paths.dotenv}.${NODE_ENV}.local`,
`${paths.dotenv}.${NODE_ENV}`,
// Don't include `.env.local` for `test` environment
// since normally you expect tests to produce the same
// results for everyone
NODE_ENV !== 'test' && `${paths.dotenv}.local`,
paths.dotenv,
].filter(Boolean);
// Load environment variables from .env* files. Suppress warnings using silent
// if this file is missing. dotenv will never modify any environment variables
// that have already been set. Variable expansion is supported in .env files.
// https://github.com/motdotla/dotenv
// https://github.com/motdotla/dotenv-expand
dotenvFiles.forEach(dotenvFile => {
if (fs.existsSync(dotenvFile)) {
require('dotenv-expand')(
require('dotenv').config({
path: dotenvFile,
})
);
}
});
// We support resolving modules according to `NODE_PATH`.
// This lets you use absolute paths in imports inside large monorepos:
// https://github.com/facebook/create-react-app/issues/253.
// It works similar to `NODE_PATH` in Node itself:
// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
// Otherwise, we risk importing Node.js core modules into an app instead of webpack shims.
// https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421
// We also resolve them to make sure all tools using them work consistently.
const appDirectory = fs.realpathSync(process.cwd());
process.env.NODE_PATH = (process.env.NODE_PATH || '')
.split(path.delimiter)
.filter(folder => folder && !path.isAbsolute(folder))
.map(folder => path.resolve(appDirectory, folder))
.join(path.delimiter);
// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
// injected into the application via DefinePlugin in webpack configuration.
const REACT_APP = /^REACT_APP_/i;
function getClientEnvironment(publicUrl) {
const raw = Object.keys(process.env)
.filter(key => REACT_APP.test(key))
.reduce(
(env, key) => {
env[key] = process.env[key];
return env;
},
{
// Useful for determining whether we’re running in production mode.
// Most importantly, it switches React into the correct mode.
NODE_ENV: process.env.NODE_ENV || 'development',
// Useful for resolving the correct path to static assets in `public`.
// For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
// This should only be used as an escape hatch. Normally you would put
// images into the `src` and `import` them in code to get their paths.
PUBLIC_URL: publicUrl,
// We support configuring the sockjs pathname during development.
// These settings let a developer run multiple simultaneous projects.
// They are used as the connection `hostname`, `pathname` and `port`
// in webpackHotDevClient. They are used as the `sockHost`, `sockPath`
// and `sockPort` options in webpack-dev-server.
WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST,
WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH,
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT,
}
);
// Stringify all values so we can feed into webpack DefinePlugin
const stringified = {
'process.env': Object.keys(raw).reduce((env, key) => {
env[key] = JSON.stringify(raw[key]);
return env;
}, {}),
};
return { raw, stringified };
}
module.exports = getClientEnvironment;
'use strict';
const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
const chalk = require('react-dev-utils/chalk');
const paths = require('./paths');
// Ensure the certificate and key provided are valid and if not
// throw an easy to debug error
function validateKeyAndCerts({ cert, key, keyFile, crtFile }) {
let encrypted;
try {
// publicEncrypt will throw an error with an invalid cert
encrypted = crypto.publicEncrypt(cert, Buffer.from('test'));
} catch (err) {
throw new Error(
`The certificate "${chalk.yellow(crtFile)}" is invalid.\n${err.message}`
);
}
try {
// privateDecrypt will throw an error with an invalid key
crypto.privateDecrypt(key, encrypted);
} catch (err) {
throw new Error(
`The certificate key "${chalk.yellow(keyFile)}" is invalid.\n${
err.message
}`
);
}
}
// Read file and throw an error if it doesn't exist
function readEnvFile(file, type) {
if (!fs.existsSync(file)) {
throw new Error(
`You specified ${chalk.cyan(
type
)} in your env, but the file "${chalk.yellow(file)}" can't be found.`
);
}
return fs.readFileSync(file);
}
// Get the https config
// Return cert files if provided in env, otherwise just true or false
function getHttpsConfig() {
const { SSL_CRT_FILE, SSL_KEY_FILE, HTTPS } = process.env;
const isHttps = HTTPS === 'true';
if (isHttps && SSL_CRT_FILE && SSL_KEY_FILE) {
const crtFile = path.resolve(paths.appPath, SSL_CRT_FILE);
const keyFile = path.resolve(paths.appPath, SSL_KEY_FILE);
const config = {
cert: readEnvFile(crtFile, 'SSL_CRT_FILE'),
key: readEnvFile(keyFile, 'SSL_KEY_FILE'),
};
validateKeyAndCerts({ ...config, keyFile, crtFile });
return config;
}
return isHttps;
}
module.exports = getHttpsConfig;
'use strict';
// This is a custom Jest transformer turning style imports into empty objects.
// http://facebook.github.io/jest/docs/en/webpack.html
module.exports = {
process() {
return 'module.exports = {};';
},
getCacheKey() {
// The output is always the same.
return 'cssTransform';
},
};
'use strict';
const path = require('path');
const camelcase = require('camelcase');
// This is a custom Jest transformer turning file imports into filenames.
// http://facebook.github.io/jest/docs/en/webpack.html
module.exports = {
process(src, filename) {
const assetFilename = JSON.stringify(path.basename(filename));
if (filename.match(/\.svg$/)) {
// Based on how SVGR generates a component name:
// https://github.com/smooth-code/svgr/blob/01b194cf967347d43d4cbe6b434404731b87cf27/packages/core/src/state.js#L6
const pascalCaseFilename = camelcase(path.parse(filename).name, {
pascalCase: true,
});
const componentName = `Svg${pascalCaseFilename}`;
return `const React = require('react');
module.exports = {
__esModule: true,
default: ${assetFilename},
ReactComponent: React.forwardRef(function ${componentName}(props, ref) {
return {
$$typeof: Symbol.for('react.element'),
type: 'svg',
ref: ref,
key: null,
props: Object.assign({}, props, {
children: ${assetFilename}
})
};
}),
};`;
}
return `module.exports = ${assetFilename};`;
},
};
'use strict';
const fs = require('fs');
const path = require('path');
const paths = require('./paths');
const chalk = require('react-dev-utils/chalk');
const resolve = require('resolve');
/**
* Get additional module paths based on the baseUrl of a compilerOptions object.
*
* @param {Object} options
*/
function getAdditionalModulePaths(options = {}) {
const baseUrl = options.baseUrl;
// We need to explicitly check for null and undefined (and not a falsy value) because
// TypeScript treats an empty string as `.`.
if (baseUrl == null) {
// If there's no baseUrl set we respect NODE_PATH
// Note that NODE_PATH is deprecated and will be removed
// in the next major release of create-react-app.
const nodePath = process.env.NODE_PATH || '';
return nodePath.split(path.delimiter).filter(Boolean);
}
const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
// We don't need to do anything if `baseUrl` is set to `node_modules`. This is
// the default behavior.
if (path.relative(paths.appNodeModules, baseUrlResolved) === '') {
return null;
}
// Allow the user set the `baseUrl` to `appSrc`.
if (path.relative(paths.appSrc, baseUrlResolved) === '') {
return [paths.appSrc];
}
// If the path is equal to the root directory we ignore it here.
// We don't want to allow importing from the root directly as source files are
// not transpiled outside of `src`. We do allow importing them with the
// absolute path (e.g. `src/Components/Button.js`) but we set that up with
// an alias.
if (path.relative(paths.appPath, baseUrlResolved) === '') {
return null;
}
// Otherwise, throw an error.
throw new Error(
chalk.red.bold(
"Your project's `baseUrl` can only be set to `src` or `node_modules`." +
' Create React App does not support other values at this time.'
)
);
}
/**
* Get webpack aliases based on the baseUrl of a compilerOptions object.
*
* @param {*} options
*/
function getWebpackAliases(options = {}) {
const baseUrl = options.baseUrl;
if (!baseUrl) {
return {};
}
const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
if (path.relative(paths.appPath, baseUrlResolved) === '') {
return {
src: paths.appSrc,
};
}
}
/**
* Get jest aliases based on the baseUrl of a compilerOptions object.
*
* @param {*} options
*/
function getJestAliases(options = {}) {
const baseUrl = options.baseUrl;
if (!baseUrl) {
return {};
}
const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
if (path.relative(paths.appPath, baseUrlResolved) === '') {
return {
'^src/(.*)$': '<rootDir>/src/$1',
};
}
}
function getModules() {
// Check if TypeScript is setup
const hasTsConfig = fs.existsSync(paths.appTsConfig);
const hasJsConfig = fs.existsSync(paths.appJsConfig);
if (hasTsConfig && hasJsConfig) {
throw new Error(
'You have both a tsconfig.json and a jsconfig.json. If you are using TypeScript please remove your jsconfig.json file.'
);
}
let config;
// If there's a tsconfig.json we assume it's a
// TypeScript project and set up the config
// based on tsconfig.json
if (hasTsConfig) {
const ts = require(resolve.sync('typescript', {
basedir: paths.appNodeModules,
}));
config = ts.readConfigFile(paths.appTsConfig, ts.sys.readFile).config;
// Otherwise we'll check if there is jsconfig.json
// for non TS projects.
} else if (hasJsConfig) {
config = require(paths.appJsConfig);
}
config = config || {};
const options = config.compilerOptions || {};
const additionalModulePaths = getAdditionalModulePaths(options);
return {
additionalModulePaths: additionalModulePaths,
webpackAliases: getWebpackAliases(options),
jestAliases: getJestAliases(options),
hasTsConfig,
};
}
module.exports = getModules();
'use strict';
const path = require('path');
const fs = require('fs');
const getPublicUrlOrPath = require('react-dev-utils/getPublicUrlOrPath');
// Make sure any symlinks in the project folder are resolved:
// https://github.com/facebook/create-react-app/issues/637
const appDirectory = fs.realpathSync(process.cwd());
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
// We use `PUBLIC_URL` environment variable or "homepage" field to infer
// "public path" at which the app is served.
// webpack needs to know it to put the right <script> hrefs into HTML even in
// single-page apps that may serve index.html for nested URLs like /todos/42.
// We can't use a relative path in HTML because we don't want to load something
// like /todos/42/static/js/bundle.7289d.js. We have to know the root.
const publicUrlOrPath = getPublicUrlOrPath(
process.env.NODE_ENV === 'development',
require(resolveApp('package.json')).homepage,
process.env.PUBLIC_URL
);
const moduleFileExtensions = [
'web.mjs',
'mjs',
'web.js',
'js',
'web.ts',
'ts',
'web.tsx',
'tsx',
'json',
'web.jsx',
'jsx',
];
// Resolve file paths in the same order as webpack
const resolveModule = (resolveFn, filePath) => {
const extension = moduleFileExtensions.find(extension =>
fs.existsSync(resolveFn(`${filePath}.${extension}`))
);
if (extension) {
return resolveFn(`${filePath}.${extension}`);
}
return resolveFn(`${filePath}.js`);
};
// config after eject: we're in ./config/
module.exports = {
dotenv: resolveApp('.env'),
appPath: resolveApp('.'),
appBuild: resolveApp('build'),
appPublic: resolveApp('public'),
appHtml: resolveApp('public/index.html'),
appIndexJs: resolveModule(resolveApp, 'src/index'),
appPackageJson: resolveApp('package.json'),
appSrc: resolveApp('src'),
appTsConfig: resolveApp('tsconfig.json'),
appJsConfig: resolveApp('jsconfig.json'),
yarnLockFile: resolveApp('yarn.lock'),
testsSetup: resolveModule(resolveApp, 'src/setupTests'),
proxySetup: resolveApp('src/setupProxy.js'),
appNodeModules: resolveApp('node_modules'),
publicUrlOrPath,
};
module.exports.moduleFileExtensions = moduleFileExtensions;
'use strict';
const { resolveModuleName } = require('ts-pnp');
exports.resolveModuleName = (
typescript,
moduleName,
containingFile,
compilerOptions,
resolutionHost
) => {
return resolveModuleName(
moduleName,
containingFile,
compilerOptions,
resolutionHost,
typescript.resolveModuleName
);
};
exports.resolveTypeReferenceDirective = (
typescript,
moduleName,
containingFile,
compilerOptions,
resolutionHost
) => {
return resolveModuleName(
moduleName,
containingFile,
compilerOptions,
resolutionHost,
typescript.resolveTypeReferenceDirective
);
};
This diff is collapsed. Click to expand it.
'use strict';
const fs = require('fs');
const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
const evalSourceMapMiddleware = require('react-dev-utils/evalSourceMapMiddleware');
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
const ignoredFiles = require('react-dev-utils/ignoredFiles');
const redirectServedPath = require('react-dev-utils/redirectServedPathMiddleware');
const paths = require('./paths');
const getHttpsConfig = require('./getHttpsConfig');
const host = process.env.HOST || '0.0.0.0';
const sockHost = process.env.WDS_SOCKET_HOST;
const sockPath = process.env.WDS_SOCKET_PATH; // default: '/sockjs-node'
const sockPort = process.env.WDS_SOCKET_PORT;
module.exports = function(proxy, allowedHost) {
return {
// WebpackDevServer 2.4.3 introduced a security fix that prevents remote
// websites from potentially accessing local content through DNS rebinding:
// https://github.com/webpack/webpack-dev-server/issues/887
// https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a
// However, it made several existing use cases such as development in cloud
// environment or subdomains in development significantly more complicated:
// https://github.com/facebook/create-react-app/issues/2271
// https://github.com/facebook/create-react-app/issues/2233
// While we're investigating better solutions, for now we will take a
// compromise. Since our WDS configuration only serves files in the `public`
// folder we won't consider accessing them a vulnerability. However, if you
// use the `proxy` feature, it gets more dangerous because it can expose
// remote code execution vulnerabilities in backends like Django and Rails.
// So we will disable the host check normally, but enable it if you have
// specified the `proxy` setting. Finally, we let you override it if you
// really know what you're doing with a special environment variable.
disableHostCheck:
!proxy || process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true',
// Enable gzip compression of generated files.
compress: true,
// Silence WebpackDevServer's own logs since they're generally not useful.
// It will still show compile warnings and errors with this setting.
clientLogLevel: 'none',
// By default WebpackDevServer serves physical files from current directory
// in addition to all the virtual build products that it serves from memory.
// This is confusing because those files won’t automatically be available in
// production build folder unless we copy them. However, copying the whole
// project directory is dangerous because we may expose sensitive files.
// Instead, we establish a convention that only files in `public` directory
// get served. Our build script will copy `public` into the `build` folder.
// In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%:
// <link rel="icon" href="%PUBLIC_URL%/favicon.ico">
// In JavaScript code, you can access it with `process.env.PUBLIC_URL`.
// Note that we only recommend to use `public` folder as an escape hatch
// for files like `favicon.ico`, `manifest.json`, and libraries that are
// for some reason broken when imported through webpack. If you just want to
// use an image, put it in `src` and `import` it from JavaScript instead.
contentBase: paths.appPublic,
contentBasePublicPath: paths.publicUrlOrPath,
// By default files from `contentBase` will not trigger a page reload.
watchContentBase: true,
// Enable hot reloading server. It will provide WDS_SOCKET_PATH endpoint
// for the WebpackDevServer client so it can learn when the files were
// updated. The WebpackDevServer client is included as an entry point
// in the webpack development configuration. Note that only changes
// to CSS are currently hot reloaded. JS changes will refresh the browser.
hot: true,
// Use 'ws' instead of 'sockjs-node' on server since we're using native
// websockets in `webpackHotDevClient`.
transportMode: 'ws',
// Prevent a WS client from getting injected as we're already including
// `webpackHotDevClient`.
injectClient: false,
// Enable custom sockjs pathname for websocket connection to hot reloading server.
// Enable custom sockjs hostname, pathname and port for websocket connection
// to hot reloading server.
sockHost,
sockPath,
sockPort,
// It is important to tell WebpackDevServer to use the same "publicPath" path as
// we specified in the webpack config. When homepage is '.', default to serving
// from the root.
// remove last slash so user can land on `/test` instead of `/test/`
publicPath: paths.publicUrlOrPath.slice(0, -1),
// WebpackDevServer is noisy by default so we emit custom message instead
// by listening to the compiler events with `compiler.hooks[...].tap` calls above.
quiet: true,
// Reportedly, this avoids CPU overload on some systems.
// https://github.com/facebook/create-react-app/issues/293
// src/node_modules is not ignored to support absolute imports
// https://github.com/facebook/create-react-app/issues/1065
watchOptions: {
ignored: ignoredFiles(paths.appSrc),
},
https: getHttpsConfig(),
host,
overlay: false,
historyApiFallback: {
// Paths with dots should still use the history fallback.
// See https://github.com/facebook/create-react-app/issues/387.
disableDotRule: true,
index: paths.publicUrlOrPath,
},
public: allowedHost,
// `proxy` is run between `before` and `after` `webpack-dev-server` hooks
proxy,
before(app, server) {
// Keep `evalSourceMapMiddleware` and `errorOverlayMiddleware`
// middlewares before `redirectServedPath` otherwise will not have any effect
// This lets us fetch source contents from webpack for the error overlay
app.use(evalSourceMapMiddleware(server));
// This lets us open files from the runtime error overlay.
app.use(errorOverlayMiddleware());
if (fs.existsSync(paths.proxySetup)) {
// This registers user provided middleware for proxy reasons
require(paths.proxySetup)(app);
}
},
after(app) {
// Redirect to `PUBLIC_URL` or `homepage` from `package.json` if url not match
app.use(redirectServedPath(paths.publicUrlOrPath));
// This service worker file is effectively a 'no-op' that will reset any
// previous service worker registered for the same host:port combination.
// We do this in development to avoid hitting the production cache if
// it used the same host and port.
// https://github.com/facebook/create-react-app/issues/2272#issuecomment-302832432
app.use(noopServiceWorkerMiddleware(paths.publicUrlOrPath));
},
};
};
This diff could not be displayed because it is too large.
{
"name": "dfreact",
"version": "0.1.0",
"private": true,
"dependencies": {
"@babel/core": "7.9.0",
"@svgr/webpack": "4.3.3",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@toast-ui/react-chart": "^1.0.2",
"@typescript-eslint/eslint-plugin": "^2.10.0",
"@typescript-eslint/parser": "^2.10.0",
"axios": "^0.19.2",
"babel-eslint": "10.1.0",
"babel-jest": "^24.9.0",
"babel-loader": "8.1.0",
"babel-plugin-named-asset-import": "^0.3.6",
"babel-preset-react-app": "^9.1.2",
"bootstrap": "^4.5.0",
"camelcase": "^5.3.1",
"case-sensitive-paths-webpack-plugin": "2.3.0",
"css-loader": "3.4.2",
"dotenv": "8.2.0",
"dotenv-expand": "5.1.0",
"eslint": "^6.6.0",
"eslint-config-react-app": "^5.2.1",
"eslint-loader": "3.0.3",
"eslint-plugin-flowtype": "4.6.0",
"eslint-plugin-import": "2.20.1",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-react": "7.19.0",
"eslint-plugin-react-hooks": "^1.6.1",
"express": "^4.17.1",
"file-loader": "4.3.0",
"fs-extra": "^8.1.0",
"html-webpack-plugin": "4.0.0-beta.11",
"identity-obj-proxy": "3.0.0",
"jest": "24.9.0",
"jest-environment-jsdom-fourteen": "1.0.1",
"jest-resolve": "24.9.0",
"jest-watch-typeahead": "0.4.2",
"mdbreact": "^4.27.0",
"mini-css-extract-plugin": "0.9.0",
"mysql": "^2.18.1",
"mysql2": "^2.1.0",
"optimize-css-assets-webpack-plugin": "5.0.3",
"path": "^0.12.7",
"pnp-webpack-plugin": "1.6.4",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-normalize": "8.0.1",
"postcss-preset-env": "6.7.0",
"postcss-safe-parser": "4.0.1",
"react": "^16.13.1",
"react-app-polyfill": "^1.0.6",
"react-bootstrap": "^1.0.1",
"react-bootstrap-table": "^4.3.1",
"react-dev-utils": "^10.2.1",
"react-dom": "^16.13.1",
"react-router-dom": "^5.2.0",
"resolve": "1.15.0",
"resolve-url-loader": "3.1.1",
"sass-loader": "8.0.2",
"semver": "6.3.0",
"sequelize": "^5.21.10",
"sequelize-auto": "^0.4.29",
"style-loader": "0.23.1",
"terser-webpack-plugin": "2.3.5",
"ts-pnp": "1.1.6",
"url-loader": "2.3.0",
"webpack": "4.42.0",
"webpack-dev-server": "3.10.3",
"webpack-manifest-plugin": "2.2.0",
"workbox-webpack-plugin": "4.3.1"
},
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"server": "nodemon server/server.js",
"dev": "concurrently \"nodemon server/server.js\" \"node scripts/start.js\"",
"test": "node scripts/test.js"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"jest": {
"roots": [
"<rootDir>/src"
],
"collectCoverageFrom": [
"src/**/*.{js,jsx,ts,tsx}",
"!src/**/*.d.ts"
],
"setupFiles": [
"react-app-polyfill/jsdom"
],
"setupFilesAfterEnv": [
"<rootDir>/src/setupTests.js"
],
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
"<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}"
],
"testEnvironment": "jest-environment-jsdom-fourteen",
"transform": {
"^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$",
"^.+\\.module\\.(css|sass|scss)$"
],
"modulePaths": [],
"moduleNameMapper": {
"^react-native$": "react-native-web",
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy"
},
"moduleFileExtensions": [
"web.js",
"js",
"web.ts",
"ts",
"web.tsx",
"tsx",
"json",
"web.jsx",
"jsx",
"node"
],
"watchPlugins": [
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname"
]
},
"babel": {
"presets": [
"react-app"
]
},
"proxy": "http://localhost:4000",
"devDependencies": {
"concurrently": "^5.2.0",
"nodemon": "^2.0.4"
}
}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.