Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[๐ŸŒน ํšŒ๊ณ  ] ๋ฐ•์†Œ์˜ #140

Open
soyoung931014 opened this issue Jun 27, 2022 · 0 comments
Open

[๐ŸŒน ํšŒ๊ณ  ] ๋ฐ•์†Œ์˜ #140

soyoung931014 opened this issue Jun 27, 2022 · 0 comments
Assignees

Comments

@soyoung931014
Copy link
Owner

soyoung931014 commented Jun 27, 2022

์ด๋ฒˆ ํ”„๋กœ์ ํŠธ์—์„œ๋Š”..


์ด๋ฒˆ ํ”„๋กœ์ ํŠธ๋Š” ์ด์ „ ํ”„๋กœ์ ํŠธ Dajavas์—์„œ ๊ตฌํ˜„์ด ๋ฏธํก ํ–ˆ๋˜ ๋ถ€๋ถ„ ๋ณด์™„, Typescript ์‚ฌ์šฉ ๊ทธ๋ฆฌ๊ณ  ํ’€์Šคํƒ ํฌ์ง€์…˜์„ ํ†ตํ•œ ๊ฐœ๋ฐœ ์ดํ•ด๋„ ์ฆ์ง„์„ ๋ชฉ์ ์œผ๋กœ ๊ธฐํšํ–ˆ๋‹ค. ์ฃผ์ œ๋Š” ์ฒซ ๋ฒˆ์งธ ํ”„๋กœ์ ํŠธ ColorDiary์˜ ์ฃผ์ œ์—์„œ ํŒŒ์ƒํ•ด '์‚ฌ์ง„๊ณผ ๊ทธ๋ฆผ์œผ๋กœ ํ•˜๋ฃจ๋ฅผ ๊ธฐ์–ตํ•˜๋Š” ์›น ์‚ฌ์ดํŠธ'๋กœ ์žก์•˜๋‹ค. ๋‚˜๋Š” ์ด๋ฒˆ ํ”„๋กœ์ ํŠธ์—์„œ ๊ทธ ๋™์•ˆ ๋„์ „ ํ•ด๋ณด์ง€ ๋ชปํ•œ ์†Œ์…œ ๋กœ๊ทธ์ธ, ์ผ๋ฐ˜ ๋กœ๊ทธ์ธ ํŒŒํŠธ์— ์ฃผ๋ ฅํ–ˆ๋‹ค.

๋ชฉํ‘œ

  1. ์นด์นด์˜ค ์†Œ์…œ ๋กœ๊ทธ์ธ ๊ตฌํ˜„ โœ…
  2. ๋ฐ˜์‘ํ˜• CSS โœ…
  3. AWS S3 ๋ฒ„ํ‚ท์„ ์ด์šฉํ•œ ์ด๋ฏธ์ง€ ๊ด€๋ฆฌ โœ…
  4. ์ƒˆ๋กœ ๊ณ ์นจ ์‹œ ๋กœ๊ทธ์ธ ํ’€๋ฆฌ๋Š” ํ˜„์ƒ โœ…
  5. AWS ์ž๋™ํ™” ๋ฐฐํฌ โœ…
Works ย ๐Ÿ‘Š Front-end
๋žœ๋”ฉํŽ˜์ด์ง€ ๊ตฌํ˜„ ๋ฐ ๋ฐ˜์‘ํ˜• CSS
์ผ๋ฐ˜ ํšŒ์› ๊ฐ€์ž… ํŽ˜์ด์ง€ (์ค‘๋ณต ๊ฒ€์‚ฌ, ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ, ์ผ๋ฐœ ํšŒ์› ๊ฐ€์ž… ๋ฐ ๋ฐ˜์‘ํ˜• CSS)
๋กœ๊ทธ์ธ ํŽ˜์ด์ง€ (์นด์นด์˜ค ๋กœ๊ทธ์ธ, ์ผ๋ฐ˜ ๋กœ๊ทธ์ธ, ํšŒ์›์ •๋ณด Redux-persist์ €์žฅ, ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ๋ฐ ๋ฐ˜์‘ํ˜• CSS)
ํšŒ์› ์ •๋ณด ํŽ˜์ด์ง€ (ํšŒ์› ์ •๋ณด ์ˆ˜์ •, ์ผ๋ฐ˜ ํšŒ์› ํƒˆํ‡ด ๋ฐ ์นด์นด์˜ค ํšŒ์› ํƒˆํ‡ด, AWS S3 ๋ฒ„ํ‚ท์„ ์ด์šฉํ•œ ์ด๋ฏธ์ง€ ๊ด€๋ฆฌ ๋ฐ ๋ฐ˜์‘ํ˜• CSS)
๋Œ“๊ธ€ ์ปดํฌ๋„ŒํŠธ (์ƒ์„ฑ, ์ˆ˜์ •, ์‚ญ์ œ, ์กฐํšŒ)
์—๋Ÿฌ ๋กœ๋”ฉ ํŽ˜์ด์ง€ (์• ๋‹ˆ๋ฉ”์ด์…˜ ๋ฐ ๋ฐ˜์‘ํ˜• CSS)
Navigation, Footer ๊ตฌํ˜„ ๋ฐ ๋ฐ˜์‘ํ˜• CSS
๐Ÿ‘Š Back-end
token (ํ† ํฐ ๋ฐœ๊ธ‰, ํ† ํฐ ๊ฒ€์ฆ)
user (์นด์นด์˜ค ๋กœ๊ทธ์ธ, ์ค‘๋ณต๊ฒ€์‚ฌ, ์ผ๋ฐ˜ ํšŒ์›๊ฐ€์ž…, ์ผ๋ฐ˜ ๋กœ๊ทธ์ธ, Bcrypt์„ ์ด์šฉํ•œ ์•”ํ˜ธํ™”)
mypage (์นด์นด์˜ค ํšŒ์› ํƒˆํ‡ด, ์ผ๋ฐ˜ ํšŒ์› ํƒˆํ‡ด, ํšŒ์› ์ •๋ณด ์ˆ˜์ •)
comment (๋Œ“๊ธ€ ์ƒ์„ฑ,์กฐํšŒ,์ˆ˜์ •,์‚ญ์ œ)
AWS ์ž๋™ํ™” ๋ฐฐํฌ (EC2, S3, RDS, Route53, CloudFront, ELB)

์„ฑ์ทจ


๐Ÿš€ ์นด์นด์˜ค ์†Œ์…œ ๋กœ๊ทธ์ธ ๊ตฌํ˜„


  • ์นด์นด์˜ค์—์„œ ์ธ๊ฐ€ ์ฝ”๋“œ๋ฅผ ๋ฐœ๊ธ‰ ๋ฐ›์œผ๋ฉด ์š”์ฒญ ๋ฐ›์€ ์ธ๊ฐ€์ฝ”๋“œ๋ฅผ ํ†ตํ•ด ์นด์นด์˜ค์—๊ฒŒ ํ† ํฐ ๋ฐœ๊ธ‰์„ ์š”์ฒญํ•  ์ˆ˜ ์žˆ๋‹ค. ํ† ํฐ ๋ฐœ๊ธ‰ ์š”์ฒญ์€ ํด๋ผ์ด์–ธํŠธ, ์„œ๋ฒ„ ์›ํ•˜๋Š” ๊ณณ์—์„œ ์š”์ฒญ์ด ๊ฐ€๋Šฅํ•œ๋ฐ ๋‚˜์˜ ๊ฒฝ์šฐ ๋ณด์•ˆ์„ ์ข€ ๋” ๊ฐ•ํ™”ํ•˜๊ณ  ์‹ถ์–ด ์„œ๋ฒ„๋‹จ์—์„œ ํ† ํฐ ๋ฐœ๊ธ‰ ์š”์ฒญ์„ ํ•œ ํ›„ ๋ฐœ๊ธ‰๋ฐ›์€ ํ† ํฐ์„ ํด๋ผ์ด์–ธํŠธ์— ๋ณด๋‚ด์คฌ๋‹ค. ์—ฌ๊ธฐ์„œ ํ•œ ๊ฐ€์ง€ ๋ฌธ์ œ์ ์ด ๋ฐœ์ƒํ–ˆ๋Š”๋ฐ ์นด์นด์˜ค์—์„œ ๋ฐœ๊ธ‰๋ฐ›์€ ํ† ํฐ์€ ํ”„๋กœ์ ํŠธ์—์„œ ๋ฐœ๊ธ‰ํ•œ ํ† ํฐ์ด ์•„๋‹ˆ๊ธฐ ๋•Œ๋ฌธ์— ํ”„๋กœ์ ํŠธ ์„œ๋ฒ„์—์„œ ํ—ˆ๊ฐ€๊ฐ€ ์•ˆ๋œ๋‹ค๋Š” ์ ์ด์—ˆ๋‹ค. ๊ทธ๋ž˜์„œ ์นด์นด์˜ค ํ† ํฐ์„ ๋ฐœ๊ธ‰ ๋ฐ›์€ ํ›„ ์ •๋ณด๋กœ signํ•ด์ฃผ์–ด ํ”„๋กœ์ ํŠธ ํ† ํฐ์œผ๋กœ ์žฌ ์ƒ์„ฑ ํ›„ ํด๋ผ์ด์–ธํŠธ์— ๋ณด๋‚ด์คŒ์œผ๋กœ ํ•ด๊ฒฐํ–ˆ๋‹ค.
  • Pickshare ์นด์นด์˜ค ๋กœ๊ทธ์ธ ๋กœ์ง
    แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2022-06-27 แ„‹แ…ฉแ„’แ…ฎ 8 14 33

์ฐธ๊ณ ๋กœ ์ธ๊ฐ€ ์ฝ”๋“œ๋Š” ๋กœ๋”ฉํŽ˜์ด์ง€์—์„œ ์ฒ˜๋ฆฌ ํ–ˆ๋‹ค.

๐Ÿš€ ๋ฐ˜์‘ํ˜• CSS, ์‚ฌ์ด๋“œ๋ฐ” ๊ตฌํ˜„


  • ์ด์ „ ํ”„๋กœ์ ํŠธ ๋•Œ ์‚ฌ์ด๋“œ ๋ฐ”๋ฅผ ๊ตฌํ˜„ํ•˜๋Š”๋ฐ ์ปดํฌ๋„ŒํŠธ ๊ฐœ๋…์œผ๋กœ ์ ‘๊ทผ์„ ์‹œ๋„ํ•˜๋‹ค ์‹คํŒจํ–ˆ๋‹ค. ๊ตฌ๊ธ€๋ง์„ ํ•ด๋ณด๋‹ˆ CSS(Media query)๋ฅผ ์ด์šฉํ•˜๋ฉด ๋ฐ˜์‘ํ˜• ์›น์„ ๋งŒ๋“ค๊ธฐ ์‰ฝ๊ณ  ํ™”๋ฉด์ด ์ค„์–ด๋“ฆ์— ๋”ฐ๋ผ ๋ ˆ์ด์•„์›ƒ์˜ ์œ„์น˜๋ฅผ ๋ณ€๊ฒฝํ•˜์—ฌ ์‚ฌ์ด๋“œ ๋ฐ”์ฒ˜๋Ÿผ ๋ณด์ด๊ฒŒ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ์‚ฌ์‹ค์„ ๊นจ๋‹ฌ์•˜๋‹ค.
    [๐Ÿš€ Dev Log] ๋ฐ•์†Œ์˜ / 2022-05-11ย #51

๐Ÿš€ TypeScript


  • ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์—์„œ ๋ณด์žฅ ๋ฐ›์„ ์ˆ˜ ์—†์—ˆ๋˜ ํƒ€์ž…์„ ๋ณด์žฅ๋ฐ›์Œ์œผ๋กœ์„œ ์กฐ๊ธˆ ๋” ์•ˆ์ •์ ์ธ ์†Œํ”„ํŠธ์›จ์–ด๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค๋Š” ์ด์œ ๋กœ ํ”„๋กœ์ ํŠธ์— ์ ์šฉ์‹œ์ผฐ๋‹ค. ๊ธฐ๋ณธ ํƒ€์ž…๋“ค์„ ์ˆ™์ง€ํ•œ ํ›„ ํ”„๋กœ์ ํŠธ์— ๋ฐ”๋กœ ์ ์šฉ์‹œ์ผฐ๋Š”๋ฐ ์ฒ˜์Œ์— ๋ฌด์ˆ˜ํ•œ ํƒ€์ž… ์—๋Ÿฌ์— ๋‹นํ™ฉํ–ˆ๋‹ค. ๊ฒฐ๊ตญ์€ ์—๋Ÿฌ๋ฅผ ์ž ์žฌ์šฐ๊ณ ์ž any ํƒ€์ž…์„ ๋งŽ์ด ์‚ฌ์šฉํ•˜๊ฒŒ ๋˜์—ˆ๊ณ  '์ด๋Ÿด๊ฑฐ๋ฉด ์™œ ์‚ฌ์šฉํ–ˆ์ง€?'๋ผ๋Š” ํšŒ์˜๊ฐ์ด ๋“ค์—ˆ๋‹ค. ๋‹ค์‹œ ๊ณต๋ถ€ํ•ด์„œ ์ œ๋Œ€๋กœ ์ ์šฉ์‹œ์ผœ์•ผ๊ฒ ๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“ค์—ˆ๋‹ค. ์ด๋ฒˆ ํ”„๋กœ์ ํŠธ์—์„œ ๊ฐ€์žฅ ์•„์‰ฌ์šด ๋ถ€๋ถ„ ์ค‘ ํ•˜๋‚˜๋‹ค.

๐Ÿš€ Nest.js


  • ํƒ€์ž…์Šคํฌ๋ฆฝํŠธ๋ฅผ ์„œ๋ฒ„์—์„œ๋„ ์‚ฌ์šฉํ•ด์ฃผ๋ ค๋ฉด Nest.js ํ”„๋ ˆ์ž„ ์›Œํฌ๋ฅผ ์‚ฌ์šฉํ•ด์•ผ๋งŒ ํ•œ๋‹ค๋Š” ํŒ€์›์˜ ๋ง์— Nest.js๋ฅผ ์ ์šฉ ์‹œ์ผฐ๋‹ค.(๋‚˜์ค‘์— ๊ณต์‹ ๋ฌธ์„œ๋ฅผ ๋ณด๊ณ  ์•Œ๊ฒŒ ๋œ ์‚ฌ์‹ค์ด์ง€๋งŒ ํƒ€์ž…์Šคํฌ๋ฆฝํŠธ express์—์„œ๋„ ์‚ฌ์šฉ ๊ฐ€๋Šฅ ํ•˜๋‹ค. ๋Š˜ ์ œ๋Œ€๋กœ ์•Œ๊ณ  ์ ์šฉํ•˜์ž ๐Ÿ˜‚) ๋น„๋ก ์ž˜๋ชป ์•Œ๊ณ  ์‚ฌ์šฉํ–ˆ์ง€๋งŒ Nest.js์˜ ํŽธ๋ฆฌํ•จ์€ ์ •๋ง ์ตœ๊ณ ์˜€๋‹ค. ์Šคํ‚ค๋งˆ ์ˆ˜์ •์‹œ express๋Š” sequelize๋ฅผ ๋‹ค์‹œ ์ƒ์„ฑํ•ด ์ฃผ์–ด์•ผํ•˜๋Š” ๋ฒˆ๊ฑฐ๋กœ์›€์ด ์žˆ์ง€๋งŒ Nest.js๋Š” entity์— ์ถ”๊ฐ€ํ•˜๋ฉด ๋œ๋‹ค๋Š” ์‚ฌ์‹ค์ด ์ถ”ํ›„์— ์œ ์ง€๋ณด์ˆ˜ ์ธก๋ฉด์—์„œ ์•„์ฃผ ํฐ ์žฅ์ ์ด๋ผ๋Š” ์ƒ๊ฐ์ด ๋“ค์—ˆ๋‹ค . (ColorDiary์—์„œ ์Šคํ‚ค๋งˆ๋ฅผ 5๋ฒˆ ์ด์ƒ ์ˆ˜์ •ํ•œ ๊ฒฝํ—˜์ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋” ํฐ ํšจ๊ณผ๋ฅผ ๋Š๋‚€๊ฒƒ ๊ฐ™๋‹ค.) ๊ทธ๋ฆฌ๊ณ  ํ•˜๋‚˜์˜ ํด๋”์— module, controller, service๊ฐ€ ๊ธฐ๋ณธ์ ์œผ๋กœ ๊ตฌ์„ฑ๋˜์–ด์žˆ์–ด ๋ณด๊ธฐ์—๋„ ํ™œ์šฉํ•˜๊ธฐ์—๋„ ํŽธ๋ฆฌํ–ˆ๋‹ค.

๐Ÿš€ AWS S3 ๋ฒ„ํ‚ท์„ ์ด์šฉํ•œ ์ด๋ฏธ์ง€ ๊ด€๋ฆฌ


  • ์—…๋กœ๋“œํ•œ ์ด๋ฏธ์ง€๋Š” S3์—์„œ ๊ด€๋ฆฌ์‹œํ‚ค๊ณ  ์„œ๋ฒ„์—๋Š” ์ด๋ฆ„๋งŒ ์ €์žฅํ•ด์„œ ํŒŒ์ผ ์šฉ๋Ÿ‰์„ ์ค„์ผ ์ˆ˜ ์žˆ์—ˆ๋‹ค. ์ด์ „ ํ”„๋กœ์ ํŠธ์—์„œ๋„ S3๋ฅผ ์ด์šฉํ•ด ์ด๋ฏธ์ง€๋ฅผ ๊ด€๋ฆฌํ–ˆ์—ˆ๋Š”๋ฐ ๋‚ด๊ฐ€ ๊ตฌํ˜„ํ•œ๊ฒƒ์ด ์•„๋‹ˆ์—ˆ์–ด์„œ ์ด๋ฒˆ ๊ธฐํšŒ์— ๊ผญ ํ•ด๋ณด๊ณ ํ”ˆ ๋ถ€๋ถ„์ด์—ˆ๋‹ค.

S3 ํŒŒ์ผ ์—…๋กœ๋“œ ์ˆœ์„œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

  1. IAM์—์„œ ์—ญํ•  ์„ค์ •ํ•˜๊ธฐ
  2. Cognito๋กœ ์ ‘๊ทผ ๊ถŒํ•œ ๋ถ€์—ฌํ•˜๊ธฐ
  3. S3 ๋ฒ„ํ‚ท ์„ค์ •ํ•˜๊ธฐ

https://recondite-detail-ab2.notion.site/AWS-S3-2727a29fe62d41aea7e242c01567ef41

๐Ÿš€ ์ƒˆ๋กœ ๊ณ ์นจ์‹œ ๋กœ๊ทธ์ธ ํ’€๋ฆฌ๋Š” ํ˜„์ƒ


  • Dajavas ํ”„๋กœ์ ํŠธ์—์„œ ์ƒˆ๋กœ๊ณ ์นจ์‹œ ๋กœ๊ทธ์ธ ํ’€๋ฆผ ํ˜„์ƒ์ด ์ผ์–ด๋‚ฌ๋Š”๋ฐ ์ด๋ฒˆ์—๋Š” Redux-Persist ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ํ†ตํ•ด ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ–ˆ๋‹ค.
    [๐Ÿš€ Dev Log] ๋ฐ•์†Œ์˜ / 2022-05-25ย #81

๐Ÿš€ Bcrypt


  • Dajavas์—์„œ ์œ ์ €์˜ ๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ DB์— ๊ทธ๋Œ€๋กœ ๋…ธ์ถœ ๋˜์—ˆ๋Š”๋ฐ , ์ด๋ฒˆ์—๋Š” ๋ณด์•ˆ ๊ฐ•ํ™”๋ฅผ ์œ„ํ•ด Bcrypt๋ฅผ ์ด์šฉํ•ด ์ง์ ‘์ ์ธ ๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ์•„๋‹Œ ์•”ํ˜ธํ™”๋œ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ DB์— ์ €์žฅ๋˜๊ฒŒ ๊ตฌํ˜„ํ–ˆ๋‹ค.

๐Ÿš€ AWS ์ž๋™ํ™” ๋ฐฐํฌ


  • Dajavas ํ”„๋กœ์ ํŠธ๋•Œ ๋ฐฐํฌ๋ฅผ ์„ฑ๊ณต ์‹œ์ผฐ์ง€๋งŒ ๋„ˆ๋ฌด ํž˜๋“ค๊ฒŒ ์„ฑ๊ณต ์‹œํ‚จ ๋‚˜๋จธ์ง€ ๋ฐฐํฌ์— ๋Œ€ํ•œ ๋‘๋ ค์›€์ด ๋‚จ์•„ ์žˆ์—ˆ๋‹ค. ๊ทธ๋ž˜์„œ ๋‹ค์‹œ ํ•œ ๋ฒˆ ๋„์ „ ํ–ˆ๋‹ค.
    ๊ฐ€์žฅ ์ž์‹  ์—†๋˜ ๋ถ€๋ถ„์€ ํด๋ผ์ด์–ธํŠธ ๋นŒ๋“œ ์‹œ memory leak ๋ฌธ์ œ ๋ถ€๋ถ„์ด์—ˆ๋‹ค. ์—ญ์‹œ๋‚˜ ๋˜‘๊ฐ™์€ ๋ฌธ์ œ๋ฅผ ๊ฒช๊ฒŒ ๋˜์—ˆ๊ณ  ๋นŒ๋“œ ์‹คํŒจ์œจ์„ ์ค„์ด๊ธฐ ์œ„ํ•ด (๋”ฐ๋กœ ์ •๋ฆฌํ•ด ๋†”์•ผ๊ฒ ๋‹ค) ๋…ธ๋ ฅํ–ˆ๊ณ  ์ถ”๊ฐ€๋กœ ๋ฌผ๋ฆฌ ๋ฉ”๋ชจ๋ฆฌ๊ฐ€ ๋ถ€์กฑํ•  ๊ฒฝ์šฐ HDD์˜ ์ผ์ • ๊ณต๊ฐ„์„ ํ• ๋‹นํ•˜์—ฌ RAM ์ฒ˜๋Ÿผ ์‚ฌ์šฉํ•˜๋Š” ์Šค์™‘์ด๋ž€๊ฑธ ์ ์šฉ์‹œ์ผœ๋ดค๋”๋‹ˆ ๋นŒ๋“œ ์„ฑ๊ณต๋ฅ ์ด ์ด์ „๋ณด๋‹ค ๋งŽ์ด ๋†’์•„์กŒ๋‹ค. (๊ทธ๋ฆฌ๊ณ ๋Š” ๋ฐ”๋กœ Dajavas๋„ ์Šค์™‘ ์ ์šฉ์‹œ์ผฐ๋”๋‹ˆ ์„ฑ๊ณต๋ฅ ์ด ๋” ์˜ฌ๋ž๋‹ค ๐Ÿ˜ )

  • ๋ฒ„์ „ ๋ฌธ์ œ:

  • [๐Ÿš€ Dev Log] ์ด๋ฆ„ / 2022-05-31ย #100

  • [๐Ÿš€ Dev Log] ๋ฐ•์†Œ์˜ / 2022-06-02ย #104

  • Javacript Heap out of memory:
    -[๐Ÿš€ Dev Log] ๋ฐ•์†Œ์˜ / 2022-06-01ย #102

  • The build failed because the process exited too early. This probably means the system ran out of memory or someone called kill -9 on the process:
    -[๐Ÿš€ Dev Log] ๋ฐ•์†Œ์˜ / 2022-06-01ย #102

๐Ÿš€ Others...


์•„์‰ฌ์šด์  & ๋ณด์™„ํ•  ์ 


ํƒ€์ž…์Šคํฌ๋ฆฝํŠธ ํ™œ์šฉ ๋ฏธํก

์ผ๋‹จ ๊ฐ€์žฅ ์•„์‰ฌ์šด ์ ์€ ํƒ€์ž…์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ œ๋Œ€๋กœ ํ™œ์šฉํ•˜์ง€ ๋ชปํ•œ ๋ถ€๋ถ„์ด๋‹ค. ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋Š” ๋™์ ์ธ ์–ธ์–ด๊ณ  ํƒ€์ž…์Šคํฌ๋ฆฝํŠธ๋Š” ์ •์ ์ธ ์–ธ์–ด๋ผ๋˜๋ฐ
์‚ฌ์‹ค ์•„์ง๊นŒ์ง€ ํƒ€์ž…์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ด์šฉํ•  ๋•Œ์˜ ํŽธ์˜์„ฑ์„ ์ œ๋Œ€๋กœ ๋Š๋ผ์ง€ ๋ชปํ•œ๊ฒƒ ๊ฐ™๋‹ค. ์ถ”ํ›„ ํ•™์Šต์ด ํ•„์š”ํ•˜๋‹ค.

Nest.js ๋ฏธ๋“ค์›จ์–ด ์ ๊ทน ์ด์šฉ ๋ชปํ•จ

Nest.js์—๋Š” ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๋ฏธ๋“ค์›จ์–ด๊ฐ€ ์žˆ๋‹ค. ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ๋ฅผ ๋‹ด๋‹นํ•˜๋Š” Filters, ์š”์ฒญ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ๋ฐ ํŽ˜์ด๋กœ๋“œ ๋ณ€ํ™˜์„ ์œ„ํ•œ Pipes, ์ธ์ฆ ๋ฏธ๋“ค์›จ์–ด Guards, ์‘๋‹ต ๋งตํ•‘ ๋ฐ ์บ์‹œ ๊ด€๋ฆฌ์™€ ํ•จ๊ป˜ ์š”์ฒญ ๋กœ๊น… Interceptors ๊ฐ€ ์žˆ๋Š”๋ฐ ์ด ์ค‘์—์„œ ๋‚ด๊ฐ€ ์‚ฌ์šฉํ•œ ๋ฏธ๋“ค์›จ์–ด๋Š” ์ธ์ฆ ๋‹ด๋‹น Guards์ด๋‹ค. ๋ฏธ์ฒ˜ ์‚ฌ์šฉํ•˜์ง€ ๋ชปํ•œ
๋ฏธ๋“ค์›จ์–ด๋ฅผ ๋‹ค์Œ๋ฒˆ์—๋Š” ๊ผญ ์‚ฌ์šฉํ•ด๋ด์•ผ๊ฒ ๋‹ค.

OOP ๊ณต๋ถ€ ํ•„์š”์„ฑ

์„œ๋ฒ„๋ฅผ OOP๋กœ ๊ตฌํ˜„ํ–ˆ๋Š”๋ฐ ์ฝ”๋“œ๋ฅผ ์ž์œ ์ž์žฌ๋กœ ํ™œ์šฉํ•˜์ง€ ๋ชปํ•œ๊ฒƒ ๊ฐ™์•„ ๋ถ€์กฑํ•จ์„ ๋Š๊ผˆ๋‹ค. ์ด ๋ถ€๋ถ„๋„ ์ถ”ํ›„ ํ•™์Šต์ด ํ•„์š”ํ•˜๋‹ค.

๋งˆ๋ฌด๋ฆฌ


์ด๋ฒˆ ํ”„๋กœ์ ํŠธ๋Š” ๊ธฐํš-ํ”„๋ก ํŠธ์—”๋“œ-๋ฐฑ์—”๋“œ-๋ฐฐํฌ๊นŒ์ง€ ๋ชจ๋“  ๊ณผ์ •์— ์ฐธ์—ฌํ•  ์ˆ˜ ์žˆ๊ณ  ์›ํ•˜๋Š” ๋ฐ”๋ฅผ ๋ชจ๋‘ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ์–ด์„œ ๋ฟŒ๋“ฏํ–ˆ๋˜ ํ”„๋กœ์ ํŠธ์ด๋‹ค. ๋น„๋ก ์‹œ๊ฐ„์€ ์ข€ ๊ฑธ๋ฆฌ๊ธด ํ–ˆ์ง€๋งŒ ํ”„๋กœ์ ํŠธ๋ฅผ ํ•˜์ง€ ์•Š์•˜๋”๋ผ๋ฉด ๋ชจ๋ฅด๊ณ  ์ง€๋‚˜์ณค์„ ๋ถ€๋ถ„์ด ๋งŽ์ด ์žˆ์—ˆ์„๊ฒƒ์ด๋‹ค. ์•ž์œผ๋กœ ๋ณด์™„ํ•ด์•ผํ•  ๋ถ€๋ถ„์„ ๋‚œ์นจ๋ฐ˜ ์‚ผ์•„ ํ•™์Šต ๊ณ„ํš์„ ์„ธ์›Œ์•ผ๊ฒ ๋‹ค.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant