boostcamp-2020 / issuetracker-20 Goto Github PK
View Code? Open in Web Editor NEW๐ISSUE CRACKER๐
Home Page: http://issue20.kro.kr/
๐ISSUE CRACKER๐
Home Page: http://issue20.kro.kr/
GitHub oAuth ๋ก๊ทธ์ธ
์) ์ ๋ ฅ๋ ์ด๋ฉ์ผ์ ์ด๋ฉ์ผ ํ์์ ์ค์๋ผ์ผ ํ๋ค.
์) ๋ก๊ทธ์ธ ํ๋ฉด ๋ก๋ฉ ์๊ฐ์ 1๋ถ ์ด๋ด์ฌ์ผ ํ๋ค.
์ฌ์ฉ์
๋ง์ผ์คํค ๋ชฉ๋ก์ ๋ณด์ฌ์ค๋ค.
Labels, Milestones ์ ํ ์ปดํฌ๋ํธ ๊ตฌํ
New Milestone ๋ฒํผ ๊ตฌํ
Open, Closed ํ์ ์ปดํฌ๋ํธ ๊ตฌํ
๋ง์ผ์คํค ์ปดํฌ๋ํธ
ํ์ฌ ํ๋ฉด์ด ๋ง์ผ์คํค ๋ชฉ๋ก ํ๋ฉด์ด๋ผ๋ ๊ฑธ ์ ์ ์๋๋ก ํ์ํ๋ค. ๋ ์ด๋ธ ๋ฒํผ์ ๋๋ฅด๋ฉด ๋ ์ด๋ธ ๋ชฉ๋ก ํ๋ฉด์ผ๋ก ์ด๋ํ๋ค.
์ ์ฒด ๋ง์ผ์คํค ๋ชฉ๋ก์ด ํ์๋๋ค.
๋ง์ผ์คํค ๋ชฉ๋ก ์ฐ์ธก์ ์งํ๋ฅ ๊ณผ ํด๋น ๋ง์ผ์คํค๊ณผ ๊ด๋ จ๋ ์คํ/ํด๋ก์ฆ ์ด์์ ๊ฐ์๊ฐ ํ์๋๋ค.
๋ง์ผ์คํค ์งํ๋ฅ ์๋์ Edit, Close, Delete ๋ฒํผ์ด ์์นํ๋ค. [Edit] ๋ฒํผ์ ๋๋ฅด๋ฉด ๋ง์ผ์คํค ํธ์ง ํ๋ฉด์ผ๋ก ์ด๋ํ๋ค.
๋ง์ผ์คํค ๋ชฉ๋ก ํ๋ฉด ์๋จ ์ฐ์ธก์ [New milestone] ๋ฒํผ์ด ์์นํ๋ค. ํด๋น ๋ฒํผ์ ๋๋ฅด๋ฉด ์๋ก์ด ๋ง์ผ์คํค์ ์์ฑํ๋ ํ๋ฉด์ผ๋ก ์ด๋ํ๋ค.
template render๊ฐ์ ์์ง์ ์ถ๊ฐ๋ก ์ด์ฉํด์
server์์ renderํ ํ์ด์ง์์ token์ localStorage
์ ์ ์ฅ -> ํ๋ก ํธํ์ด์ง์ ๋ฆฌ๋ค์ด๋ ํธ ์ํค๋ฉด
localStorage์ ๋ด๋ ํํ๋ก ๊ฐ๋ฅํ์ง์์๊น? ์ถ์ต๋๋ค ~~~
eslint-plugin-react์์ prop-types๋ฅผ ์ด์ฉํ ๊ฒ์ ๊ถ์ฅํ๊ณ ์์.
React component์ ์ํ๋ฅผ ๋ด๋นํ๋ prop์ type์ ์ง์ ํด, prop์ ์๋ชป๋ type์ด ๋ค์ด์ค๋ฉด error๊ฐ ๋์ค๋๋ก ์ค์ ํ๋ ๊ฒ.
TS์ฒ๋ผ type checking์ด ๊ฐ๋ฅํด์ ธ ๋๋ฒ๊น
์ด ํธํด์ง๋ค.
TS์ ๋ค๋ฅธ ์ ์, build๊ฐ ์๋ runtime์ type checking์ด ๋ฐ์ํ๊ฒ ๋๋ค.
ํจํค์ง ์ค์น
npm i prop-types
๊ฐ React component์
import PropTypes from 'prop-types';
class Greeting extends React.Component {
render() {
return (
<h1>Hello, {this.props.name}</h1>
);
}
}
Greeting.propTypes = {
name: PropTypes.string
};
frontend์ .eslintrc.json
์ ์์ธ ์ฒ๋ฆฌ
{
"rules": {
"react/prop-types": "off"
}
}
#63 ํด๊ฒฐ ์ ๊ฒฝ๋ก๋ฅผ ์ง์ ํด์ ์ด๋ํ ์ ์๋๋ฐ /login ๊ฒฝ๋ก์ ์ ๊ทผํ ๊ฒฝ์ฐ ๊ณง๋ฐ๋ก ๋ก๊ทธ์ธ ํ์ด์ง๋ก ์ ๊ทผํ๊ฒ ๋๋๋ฐ์.
๋ก๊ทธ์ธ ํ์ด์ง์์ ์ธ์
์ ์ ๊ฒํ์ง ์์์ ๊ทธ๋ฐ์ง, ์ ํํ ์์ธ์ ํ์
ํ์ง ์์์ง๋ง ๋ฉ์ธ ํ์ด์ง๋ก ์ด๋๋์ง ์๊ณ ๋ก๊ทธ์ธ ํ์ด์ง์ ๋จธ๋ฌผ๊ฒ ๋ฉ๋๋ค.
๋ฒ๊ทธ๋ผ๊ณ ์๊ฐ๋๋ค์.
Setting์ด๋ผ ์ด์์์ต๋๋ค.
ใ
๋ฐ๋ณต์ ์ผ๋ก ์ฌ์ฉํ๋ css๊ฐ๋ค(Main Color, padding)๊ฐ์ ๋ณ์๋ก ์ ์ธํด ์ฌ์ฉํ๊ณ ์ ํฉ๋๋ค.
css-in-js์ styledcomponent๊ด๋ จ.
[New label] ๋ฒํผ ํด๋ฆญ ์, ๋ค์๊ณผ ๊ฐ์ ์๋ก์ด ๋ ์ด๋ธ์ ์ถ๊ฐํ ์ ์๋ ์์ญ์ด ๋ํ๋๋ค. ํ ๋ฒ ๋ ํด๋ฆญํ๋ฉด ํด๋น ์์ญ์ด ๋ค์ ์ฌ๋ผ์ง๋ค.
Labels ๋ฒํผ์ ๋๋ฅด๋ฉด ๋ ์ด๋ธ ๋ชฉ๋ก ํ๋ฉด์ผ๋ก ์ด๋ํ๋ค.
Milestones ๋ฒํผ์ ๋๋ฅด๋ฉด ๋ง์ผ์คํค ๋ชฉ๋ก ํ๋ฉด์ผ๋ก ์ด๋ํ๋ค.
์ด์ ๋ชฉ๋ก ํ๋ฉด ์ปดํฌ๋ํธ๋ฅผ ๊ตฌํํ๋ค.
ํ์ ์ปดํฌ๋ํธ๋ฅผ ๋ฐฐ์นํ๊ณ New issue ๋ฒํผ์ ๊ตฌํํ๋ค.
New issue ๋ฒํผ์ ๋๋ฅด๋ฉด ์๋ก์ด ์ด์๋ฅผ ์์ฑํ๋ ํ๋ฉด์ผ๋ก ์ด๋ํ๋ค.
๋ ์ด๋ธ ๋ชฉ๋ก ๋งํฌ์ ๊ตฌํํ๊ธฐ
์ ์ฒด ๋ ์ด๋ธ ๋ชฉ๋ก์ด ํ์๋๋ค.
express generator์ ์ฌ์ฉํด์ express ๋ง๋ค๊ธฐ
DB์ ์๋ Labels ์ ๋ณด๋ฅผ ๋ฆฌํดํ๋ API๋ฅผ ๊ตฌํํ๋ค.
Label์ name, description, color๋ฅผ ๋ฆฌํดํ๋ API๋ฅผ ๊ตฌํํ๋ค.
์ ์ฒด ๋ ์ด๋ธ ๋ชฉ๋ก์ด ํ์๋๋ค.
FE ์ด์ ๋ชฉ๋ก๋ณด๊ธฐ์์ DB์ ์๋ ์ด์๋ฅผ ๋ณด์ฌ์ค ์ ์๋๋ก ์ด์ ๋ชฉ๋ก์ ๋ฆฌํดํ๋ API๋ฅผ ๊ตฌํํ๋ค.
titie, content, isOpened, author, milestone, createDate, assignee ์ ๋ณด๊ฐ ์๋ ์ด์ ๋ชฉ๋ก ๋ฐ์ดํฐ๋ฅผ ๋ฆฌํดํ๋ค.
fetch์ ์ฌ์ฉํ๋ ํค๋ ๋ฑ์ ๊ณตํต ๋ถ๋ถ์ ๋ชจ๋๋ก ์์ฑํ๊ณ importํ์ฌ ์ฌ์ฉํ๊ณ ์ ํจ
์ด๋ฐ์ฃ ?
ํ๋ก ํธ์๋์์ Sign in with GitHub์ ํด๋ฆญ์ ์ฌ์ฉ์ ์ธ์ฆ ํ ๋ก๊ทธ์ธ ํ ์ ์๋๋ก ํ๋ค.
๋ก๊ทธ์ธ์ GitHub OAuth๋ฅผ ์ง์ํด์ผ ํ๋ค. (ํ์)
DB์ ์๋ Milestones ์ ๋ณด๋ฅผ ๋ฆฌํดํ๋ API๋ฅผ ๊ตฌํํ๋ค.
์ ์ฒด ๋ง์ผ์คํค ๋ชฉ๋ก์ด ํ์๋๋ค.
Issue, comment ๊ธฐ๋ฅ์์ ์ด๋ฏธ์ง ์ถ๊ฐ๋ฅผ ํด์ผํ๋ค.
์ด๋ Imgur API๋ฅผ ์ฌ์ฉํ๊ธฐ ์ํด API๋ฅผ ํ์ตํ๊ณ ํ์๋ค๊ณผ ๊ณต์ ํ๋ค.
utils/auth์ isAuthenticated๋ฅผ ๊ตฌํ
DB์์ ๋ถ๋ฌ์ค๋ createDate๊ฐ์ด date๊ฐ์ฒด๊ฐ ์๋ string๊ฐ์ฒด๋ก ์ธ์๋์ time.getTime๋ฉ์๋๊ฐ ์๋์ ์ํจ.
๊ทธ ๋ถ๋ถ ํด๊ฒฐํ๊ฒ ์ต๋๋ค.
react-hooks-fetch-data ์ฝ์ด๋ณด๊ณ ์ด์๋ชฉ๋ก์์ ์ด์ fetchํด์ db์ ์๋ ๊ฒ ๋ณด์ฌ์ฃผ๊ธฐ
Sequelize ๋ชจ๋ธ์ Title ์ถ๊ฐ
ERD ์์
์ธ์ ๊ฐ ์ธ์ง๋ ๋ชจ๋ฅด๋ ํ ์คํธ ํ๋ ์์ํฌ Jest๋ฅผ ํ๋ก์ ํธ์ ํฌํจ
Filter ๊ฒ์ ์ฐฝ์ IssuePage์ filter State ๊ฐ์ด ๋ค์ด๊ฐ๊ฒ ํด์
์ฌ๋ฌ Filter(Author, Label๋ฑ ๋ชจ๋ฌ์ฐฝ์์ ํด๋ฆญ๋์์ ๋ ์ ์ฉ๋จ)๊ฐ ํด๋ฆญ๋๊ฑฐ๋ ์ง์ ์
๋ ฅ๋์์ ๋ ๊ฒ์์ฐฝ์ ์ ์ฉ๋ ์ ์๋๋ก ํ๊ธฐ
์์ ์ปดํฌ๋ํธ์์ setState๋ฅผ ๋ฐ์ ๊ทธ ๊ณณ์ title๋ฑ ์ ๋ณด๋ฅผ ๋๊ฒจ์ฃผ๋ ๋ฐฉ์?
ใ ใ ใ ใ
๋ ์ด๋ธ ์ถ๊ฐ ์ปดํฌ๋ํธ๋ฅผ ์์ฉํด์ ์์ ๊ธฐ๋ฅ ๋ง๋ค๊ธฐ
expected:
redirect ์์ด frontend html file์ serveํด์ผํจ.
actual:
'/'์ผ๋ก redirect๋๋ฏ๋ก ์๋ก๊ณ ์นจ ๋ฑ์ ์ํฉ์์ ๋ฐ๋์ main page๊ฐ render๋๋ฒ๋ฆผ.
hello
๊นํ๋ธ๋ ์ ๋ชฉ์ ๋๋ ์๋๋ง ์ด๋์ด ๋๋๋ฐ,
์ง๊ธ์ ์ด์ ์ปดํฌ๋ํธ ์ ์ฒด์ ๋งํฌ๋ฅผ ๊ฑธ์ด๋์ ๋ ์ด๋ธ์ ํด๋ฆญํ์๋์ ์ด๋ฒคํธ ๋ฑ์ ๋ฑ๋กํ ์ ์๋ค.
์ถํ ์ ๋ชฉ์ผ๋ก ๋งํฌ๊ธฐ๋ฅ์ ์ด๋์ํจ๋ค.
์ด์ ๋ชฉ๋ก์ ๋ณด์ฌ์ค๋ค.
์ด์ ํธ๋์ปค ์ฒซ ํ๋ฉด์ ๋ค์๊ณผ ๊ฐ๋ค.
npm init -y
npm i -D @babel/core @babel/preset-env @babel/register core-js@3
npm i -D webpack webpack-cli babel-loader webpack-node-externals clean-webpack-plugin
npm i express
npm i react react-dom
npm i -D @babel/preset-react html-webpack-plugin
npx install-peerdeps --dev eslint-config-airbnb-base
npm i -D eslint-plugin-react
.eslintrc.json
{
"env": {
"node": true
},
"extends": "airbnb-base"
}
.eslintrc.json
์ด์๊ด๋ จ ๊ธฐ๋ฅ์ ์ํํ๋ ์ปดํฌ๋ํธ๋ฅผ ๊ตฌํํ๋ค.
์ด์ ๋ชฉ๋ก์ ๋ณด์ฌ์ค๋ค.
UTF-9์ผ๋ก ์ ๋ฐ์์ค๋ฉด ์์ ํ ํ์ ์์
UTF์ด๊ฑฐ๋ ์ค์ ์ฐจ์ด๊ฐ ์์ผ๋ฉด ์กฐ์ ํ์
๋ง์ผ์คํค ๊ด๋ จ ์ ๋ณด๋ฅผ ๋ณด์ฌ์ฃผ๋ ์ปดํฌ๋ํธ๋ฅผ ๋ง๋ ๋ค.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.