๐์ฝ๋ฉ ๊ณต๋ถ/๊ฐ์ข ์ค๋ฅ ํด๊ฒฐ ๋ก๊ทธ
Nest.js ) Circular dependency ์ค๋ฅ ํด๊ฒฐ ๊ธฐ๋ก
* a → b : a์ b๋ฅผ ์ฃผ์ ์ํด / a์ b๋ฅผ import ํจ - ๋ชจ๋ ์๊ฐ MainModule : ์๋น์ค์ ๊ด๋ จ๋ ๋ชจ๋, ์ปจํธ๋กค๋ฌ, DB ๋ฐ์ดํฐ ๋ฑ์ ๊ด๋ฆฌ UserModule : ์ฌ์ฉ์ ์ ๋ณด๋ฅผ ์ฒ๋ฆฌํ๋ ๋ชจ๋ DataModule : DB์ ํต์ ํ๋ฉฐ ๋ฐ์ดํฐ๋ฅผ ์ฒ๋ฆฌํ๋ ๋ชจ๋ UtilModule: Util์ฑ ์ฝ๋ ๋ฐ ์๋น์ค๋ค ๋ชจ์ SomeUtil : DB๋ฐ์ดํฐ๋ฅผ ํ์ฉํ์ฌ ํน์ ์์ญ๊ณผ ๊ด๋ จ๋ ์ฒ๋ฆฌ๋ฅผ ํ๋ ์๋น์ค - ๋ฐฐ๊ฒฝ ์ ๋ชจ๋์๊ฐ์ ๊ฐ์ด DB๋ฐ์ดํฐ๋ฅผ ํ์ฉํ์ฌ ํน์ ๋ฐ์ดํฐ๋ฅผ ์ฒ๋ฆฌํ Util์ฑ ์๋น์ค๊ฐ ํ์ํด์ก๋ค. ์ด๋ SomeUtil์ MainModule ์๋์ ์๋ UserModule์ ์ฐ์ฌ์ผ ํ๋ค. UserModule์ DataModule์ ์ฌ์ฉํ๊ณ ์์๊ณ , ๋ ๋ชจ๋ ๋ชจ๋ UtilModule์ impo..
Nest.js) ์์กด์ฑ, ์ฃผ์ ๊ด๋ จ์ค๋ฅ / Error: Nest can't resolve dependencies of ... ์๋ฌด๋ฆฌํด๋ ํด๊ฒฐ์ด ์๋ ๋ (Feat. chatGPT)
1. Inject ํ ๋ Cannot read properties of undefine passportStrategy์์ Service๋ฅผ ์ฃผ์ ํ์๋ ์ ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ค. โถ๏ธ ๋น ๋ฅธ ๊ฒฐ๋ก ๋ฐ๋ณด๊ฐ์ด Strategy์ @Injectable() ๋ฐ์ฝ๋ ์ดํฐ๋ฅผ ์๋ถ์ฌ์ค์ ์๊ธด ๋ฌธ์ ์๋ค. 2. Error: Nest can't resolve dependencies of ERROR [ExceptionHandler] Nest can't resolve dependencies of the SuperService (?). Please make sure that the argument UserDAL at index [0] is available in the SuperModule context. Potential solutions:..
nCloud ) Load Balancer & Auto Scaling ์ผ๋ก ์ ์ฐํ ์๋ฒ ๊ด๋ฆฌํ๊ธฐ - ๋ก๋๋ฐธ๋ฐ์์์ ์๊ธด ์ค๋ฅ ํด๊ฒฐ๊ธฐ
๋ชฉ์ฐจ ๐ Load Balancer & Auto Scaling ์๋ฒ ์ธํ ๊ด๋ จ ์๋ฃ ๊ณต์ ํ๋ก์ ํธ ๊ฐ์ด๋ (1) https://www.ncloud.com/guideCenter/project/33 (2) https://www.ncloud.com/guideCenter/guide/30 ์คํ ์ค์ผ์ผ๋ง์ ๋ํ ๊ณต์ ์๊ฐ ์์ (1) https://www.youtube.com/watch?v=eEHrknoVVa4 ๐ฟ ์ค๋ฅ ๋ฐ์ ์คํ ์ค์ผ์ผ๋ง์ ํตํด ์์ฑํ ์๋ฒ๊ฐ ์๊พธ ์ฃฝ๊ณ ์๊ธฐ๊ธฐ๋ฅผ ๋ฐ๋ณตํ๋ค. ๋ก๋ ๋ฒจ๋ฐ์์ ์ค์ผ์ผ ์ฒดํฌ์์ ๊ณ์ unhealthy๊ฐ ๋ด๋ค. ๋๋ ๋ถ๋ช ํ๋ก์ ํธ ๊ฐ์ด๋๋๋ก ํ๋๋ฐ... ๋๋์ฒด ์... ๋ค์ํ๋ฒ ๋ง์์ ๊ฐ๋ค๋ฌ๊ณ , ์ ํธ๋ธ์ ๊ณต์ ๋ฌธ์๋ฅผ ์ฐฌ์ฐฌํ ์ฝ์ด๋ณด์๋ค. 1. ACG ์ค์ ๊ณต์ ๋ฌธ์๋ฅผ ์ฐฌ์ฐฌํ ๋ณด..
React ) ์ปดํฌ๋ํธ ์ ๋ฐ๋, ์ ์ฌ๋ผ์ง, ์์ ํ์ ๋๋ฒ๊น
๋ฆฌ์กํธ๋ก ํ๋ก ํธ์๋ ์์ ์ ํ๋ฉฐ, ๊ธฐ๋ฅ ๋จ์๋ก ์ปดํฌ๋ํธ๋ฅผ ๋๋ ์ฌ์ฉํ๊ณ ์์๋ค. ํ์ ์ ํ์ ๋ฐ๋ผ ์ปดํฌ๋ํธ๋ฅผ ๋ณด์ด๊ฑฐ๋ ์จ๊ธฐ๋ ๋ฐฉ์์ด์๋ค. {/* render() ๋ถ๋ถ */} {/* ========== A์ ํ a์ปดํฌ๋ํธ ========== */} { Number(user.userRole) === CONFIG.USER_ROLE.artist && } {/* ========== A์ ํ aa์ปดํฌ๋ํธ ========== */} { Number(user.userRole) === CONFIG.USER_ROLE.artist && } {/* ========= B์ ํ b์ปดํฌ๋ํธ========== */} { Number(user.userRole) === CONFIG.USER_ROLE.vip && } ๊ทธ๋ฐ๋ฐ ์ฌ๊ธฐ์ ์ค๋ฅ๊ฐ ๋ฐ์..