๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ

API Routes API Routes๋Š” API๋ฅผ ํ˜ธ์ถœํ•  ์ˆ˜ ์žˆ๋Š” Endpoint๋ฅผ ์ƒ์„ฑํ•ด์ฃผ๋Š”๋ฐ, ์‰ฝ๊ฒŒ ๋งํ•ด๋ณด์ž๋ฉด Next.js์˜ ํŒŒ์ผ ๊ธฐ๋ฐ˜์œผ๋กœ API๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ๊ฒŒํ•ด์ค€๋‹ค. ๊ทธ๋Ÿฌ๋‹ˆ๊น ๋‹ค๋ฅธ ๋ฐฑ์—”๋“œ ํ”„๋ ˆ์ž„์›Œํฌ ํ•„์š”์—†์ด, ๋”ฐ๋กœ api๋ฅผ ๋งŒ๋“ค์–ด์„œ ์‚ฌ์šฉํ•˜์ง€ ์•Š์•„๋„ DB ์—ฐ๊ฒฐ๊นŒ์ง€ ํ•  ์ˆ˜ ์žˆ๊ณ , ๋ฐ์ดํ„ฐ ์ „์†ก์ด ๊ฐ€๋Šฅํ•˜๋‹ค๋Š” ๋ง์ด๋‹ค. Routing๊ณผ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ํŒŒ์ผ๊ธฐ๋ฐ˜์œผ๋กœ ์ด๋ฃจ์–ด์ง€๋Š”๋ฐ Nextjs14์˜ ๊ฒฝ์šฐ๋Š” pages๊ฐ€ ์•„๋‹Œ app ํด๋”์— ํŒŒ์ผ์„ ์ƒ์„ฑํ•˜๊ณ (14๋ฒ„์ ผ ์ด์ „์€ pages/api), ํ•จ์ˆ˜๋ฅผ ์ž‘์„ฑํ•˜๋ฉด ๋œ๋‹ค. API Routes๋Š” Serverless function์œผ๋กœ ์ด๋ฃจ์–ด์ ธ์žˆ๋‹ค. Serverless Function์˜ ์ปจ์…‰์€ ์š”์ฒญ(์ด๋ฒคํŠธ)์ด ๋“ค์–ด์˜ฌ ๋•Œ๋งˆ๋‹ค ์ง€์ •๋œ ํ•จ์ˆ˜๋ฅผ ์‹คํ–‰์‹œ์ผœ ์›ํ•˜๋Š” API๋ฅผ ํด๋ผ์ด์–ธํŠธ์—๊ฒŒ ์ „..
์•„๋””์˜ค์Šค! 2023 2023๋…„ ํ•œ ํ•ด๊ฐ€ ์–ผ๋งˆ ๋‚จ์ง€ ์•Š์•˜๋‹ค. ๋ฌด์Šจ ๋ง์„ ์ ์–ด์•ผ ํ•  ์ง€ ์‚ฌ์‹ค ์ •๋ฆฌ๊ฐ€ ๋˜์ง€ ์•Š์•„์„œ ํšŒ๊ณ ๋ฅผ ๋ฏธ๋ฃจ๊ณ  ๋ฏธ๋ฃจ๋‹ค๊ฐ€ ํ•œ ํ•ด๊ฐ€ ์–ผ๋งˆ ๋‚จ์ง€ ์•Š์€ ์‹œ๊ฐ„์ด ๋˜์–ด์„œ์•ผ ๋ช‡ ์ž ์ ์–ด๋ณธ๋‹ค. ๊ฐœ๋ฐœ๊ณต๋ถ€๊ธฐ๋ก์„ ์œ„ํ•œ ๋ธ”๋กœ๊ทธ์ด๋‹ˆ๊น ์‚ฌ์ƒํ™œ๋ณด๋‹ค๋Š” ๊ฐœ๋ฐœ์— ์ดˆ์ ์„ ๋งž์ถฐ์„œ ์จ์•ผ๊ฒ ์ง€? ์˜ฌ ํ•œํ•ด ์—ด์‹ฌํžˆ ์ผ ํ–ˆ๋‹ค. ์ƒˆ๋กœ์šด ํ”„๋กœ์ ํŠธ๋ฅผ ๋งˆ๋ฌด๋ฆฌ ์‹œ์ž‘ํ–ˆ๊ณ  ๋งˆ๋ฌด๋ฆฌ ์ง€์—ˆ๋‹ค. ๊ณ ์ƒ์„ ๊ฝค๋‚˜ ํ–ˆ๋‹ค๋ผ๊ณ  ์ƒ๊ฐํ–ˆ๋Š”๋ฐ ๋น„์ฆˆ๋‹ˆ์Šค์ ์ธ ๊ฒฐ๊ณผ๊ฐ€ ์ข‹์ง€ ์•Š์•„์„œ ์‹ค๋ง๋„ ๋งŽ์ดํ•œ ๊ฒƒ๊ฐ™๋‹ค. ๋น„์ฆˆ๋‹ˆ์Šค์ ์ธ ๋ถ€๋ถ„์€ ๋‚ด๊ฐ€ ์–ด๋–ป๊ฒŒ ์ปจํŠธ๋กค ํ•  ์ˆ˜ ์—†๋Š” ๋ถ€๋ถ„์ด๋‹ˆ๊น ๊ทธ ๋ถ€๋ถ„์— ๋Œ€ํ•œ ์ด์•ผ๊ธฐ๋Š” ์ ‘์–ด๋‘๊ณ , ์‹œ๋‹ˆ์–ด๊ฐ€ ์˜ฌ ์ดˆ๋ถ€ํ„ฐ ์ž๋ฆฌ๋ฅผ ๋น„์šฐ๋ฉด์„œ ์‹œ๋‹ˆ์–ด์—†์ด ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ–ˆ๊ณ , ๊ณ„์†ํ•ด์„œ ๋ฐฑ์—”๋“œ ๊ฐœ๋ฐœ์ž๋ถ„๋“ค์ด ๋ฐ”๋€Œ๋Š” ์ƒํ™ฉ๋„ ๊ฒช์œผ๋ฉด์„œ ๋‹ค์–‘ํ•œ ์‚ฌ๋žŒ๋“ค๊ณผ์˜ ํ˜‘์—…๋„ ํ•  ์ˆ˜ ์žˆ๋Š” ํ•œ ํ•ด์˜€๋‹ค. ์ง๋ฌด๋ฅผ ๊ฐœ๋ฐœ..
nextjs ํ”„๋กœ์ ํŠธ๋ฅผ ํ•  ๋•Œ๋Š” npm run dev๋ฅผ react ํ”„๋กœ์ ํŠธ๋ฅผ ํ•  ๋•Œ๋Š” npm start๋กœ ๊ฐœ๋ฐœ๋ชจ๋“œ๋ฅผ ๋Ÿฐํ•œ๋‹ค. ์™œ ํ”„๋กœ์ ํŠธ์— ๋”ฐ๋ผ์„œ ๋ช…๋ น์–ด๊ฐ€ ๋‹ค๋ฅผ๊นŒ? ๋ผ๋Š” ์ƒ๊ฐ์ด ๋“ค์—ˆ๋‹ค. ๋ฌผ๋ก  package.json์— ์„ค์ •๋œ ๊ฐ’์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค๋Š”๊ฒŒ ์ค‘์š”ํ•˜์ง€๋งŒ ์–ด์จ‹๋“  ํ”„๋กœ์ ํŠธ๋งˆ๋‹ค ์“ฐ๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ, ํ”„๋ ˆ์ž„์›Œํฌ์— ๋”ฐ๋ผ์„œ ๋””ํดํŠธ ๊ฐ’์ด ๋‹ค๋ฅด๋‹ค๋Š” ๊ฒƒ! Nextjs _ package.json next dev ⇒ ๊ฐœ๋ฐœ ๋ชจ๋“œ์—์„œ ์‹คํ–‰ next build ⇒ ํ”„๋กœ๋•์…˜ ๋นŒ๋“œ ์šฉ๋„๋กœ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋นŒ๋“œ next start ⇒ Next.js ํ”„๋กœ๋•์…˜ ์„œ๋ฒ„ ์‹œ์ž‘ next dev ๋ช…๋ น์–ด๊ฐ€ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค. ์ด ๋ช…๋ น์–ด๋Š” ๊ฐœ๋ฐœ ์„œ๋ฒ„๋ฅผ ์‹œ์ž‘ํ•˜๊ณ  Next.js ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์‹คํ–‰ next dev ๋ช…๋ น์–ด๋Š” .next ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ์ƒ์„ฑํ•˜๊ณ , Next.j..
๐Ÿ“ What I learned I feel like I've spent a month without focusing on anything and haven't achieved much. Would it be okay to use the excuse of the vacation season to explain my distracted state? Driven by the desire to broaden my skillset, I became ambitious about 'English' and decided to create a Github Pages(this one :)) dedicated solely to 'English' as a portfolio. Although i worked on various..
Today What I Did ๐Ÿ’ป Set up Multiligual on Blog I set up HTML code on the blog for English posts, but it's not perfect yet. I will keep fixing the code. ๐Ÿ’ป leetCode I've been doing "Top Interview Question" on leetCode. I learn about "new" splice() method. I didn't know that much before. ๐Ÿ“– Reading a book I've been doing "reading a book for 30 mins everyday" challenge. I missed few times. But i did ..
์˜ค๋Š˜ ํ•œ ์ผ ๐Ÿ’ป ๋ธ”๋กœ๊ทธ ๋‹ค๊ตญ์–ด์ง€์› ์…‹ํŒ… ๊ฐ€๋”์”ฉ ๊ธ€ ์˜ฌ๋ฆด ๋•Œ ์˜์–ด๋กœ๋„ ์˜ฌ๋ฆด๊นŒ์‹ถ์–ด์„œ ๋ธ”๋กœ๊ทธ์— ์˜์–ด๋กœ ์“ด ๊ธ€๋„ ๋ณผ ์ˆ˜ ์žˆ๊ฒŒ ๋‹ค์ค‘ ์ง€์›๋˜๊ฒŒ html ์ฝ”๋“œ๋ฅผ ์‚ฝ์ž…ํ–ˆ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ์™„์ „ํ•˜์ง€๋Š” ์•Š์€ ์ƒํ™ฉ์ด๋‹ค. ๊ณ„์†ํ•ด์„œ ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•ด๋‚˜๊ฐˆ ๊ฒƒ์ด๋‹ค. ๐Ÿ’ป leetCode leetCode์—์„œ Top interview guestion์„ ํ•˜๊ณ  ์žˆ๋Š”๋ฐ, splice() ๋ฉ”์†Œ๋“œ์˜ ์ƒˆ๋กœ์šด ์“ฐ์ž„์„ ์•Œ๊ฒŒ๋˜์—ˆ๋‹ค. ๐Ÿ“– ์ฑ… ์ฝ๊ธฐ ๋งค์ผ 30๋ถ„์”ฉ ์ฝ๊ธฐ๋ฅผ ๋ชฉํ‘œ๋กœ ํ•˜๊ณ  ์žˆ์ง€๋งŒ ์š”์ฆ˜๋“ค์–ด์„œ ๋ชป ํ•  ๋•Œ๊ฐ€ ๋งŽ์•˜๋Š”๋ฐ, ์˜ค๋Š˜์€ ํ–ˆ๋‹ค!! ์งง์€ ๋ฆฌ๋ทฐ ์˜ค๋žœ๋งŒ์— ํ•˜๋Š” jquery, ์ˆœ์ˆ˜ javascript ์–ด๋ ต๋„ค. ๋ฆฌ์•กํŠธ์— ๋„ˆ๋ฌด ์นœ์ˆ™ํ•ด์ง ๋‚ด์ผ ํ•  ์ผ ์ด๋ชจํ‹ฐ์ฝ˜ ์ œ์ž‘ ์„œ์น˜&์Šค์ผ€์น˜ ์ •๋ฆฌํ•˜๊ธฐ ์ฝ”ํ…Œ๊ณต๋ถ€ ์ƒˆ๋กœ์šด ์‚ฌ์ด๋“œ ํ”„๋กœ์ ํŠธ ๊ธฐํš+์Šค์ผ€์น˜ HTML ์‚ฝ์ž… ๋ฏธ๋ฆฌ๋ณด๊ธฐํ•  ์ˆ˜ ์—†๋Š” ์†Œ์Šค
Considering getting a job abroad, I would like to document my studies and activities in English on my blog. I initially set up GitHub Pages for a moment, but it required too much effort, so I changed my mind. I'm now thinking it would be great if I could use my existing Tistory blog for both languages. I researched what changes I could make without using widget sources. I find that the widget fu..
ํ•ด์™ธ์ทจ์—…๋„ ๊ณ ๋ คํ•˜๊ฒŒ ๋˜๋ฉด์„œ ๊ณต๋ถ€ํ•œ ๋‚ด์šฉ์„ ๊ธฐ๋กํ•˜๊ณ  ์žˆ๋Š” ๋ธ”๋กœ๊ทธ๋ฅผ ์˜์–ด๋ฒ„์ ผ์œผ๋กœ๋„ ํ•˜๋‚˜ ๋งŒ๋“ค๊ณ  ์‹ถ์–ด์กŒ๋‹ค. github pages๋ฅผ ์ด์šฉํ•ด์„œ ๋ธ”๋กœ๊ทธ๋ฅผ ํ•˜๋‚˜ ๋” ๋งŒ๋“ค๊นŒ๋„ ๊ณ ๋ฏผํ–ˆ์ง€๋งŒ ๋ถ„๋ช…ํžˆ ๋˜ ๊พธ๋ฏธ๊ณ  ์‹ถ์–ด์งˆ ๊ฒƒ ๊ฐ™์•„์ง€๊ณ  ๊ทธ๋Ÿฌ๋ฉด ๋„ˆ๋ฌด๋‚˜ ๊ณต์ˆ˜๊ฐ€ ๋งŽ์ด ๋“ค์–ด๊ฐˆ ์ผ์ด๋ผ์„œ ์ž ์‹œ ์‹œ์ž‘ํ•˜๋ ค๊ณ (?!) ๋งŒ์กŒ๋‹ค๊ฐ€ ๋ฐ”๋กœ ๊ทธ๋งŒ๋’€๋‹ต๋‹ˆ๋‹ค. ์ด์™•ํ•˜๋Š”๊ฑฐ ์ด๋ฏธ ๊ธฐ๋ก์ค‘์ธ ํ‹ฐ์Šคํ† ๋ฆฌ์—๋‹ค๊ฐ€ ์ด์–ด์„œ ํ•˜๋ฉด ์ข‹์„ ๊ฒƒ๊ฐ™์•„์„œ ํ‹ฐ์Šคํ† ๋ฆฌ๋ฅผ ์˜์–ด๋ฒ„์ ผ์œผ๋กœ ์–ด๋–ป๊ฒŒ ๋ฐ”๊ฟ”์•ผํ• ์ง€ ๊ทธ๋Ÿฐ ๊ธฐ๋Šฅ์„ ํ•ด์ฃผ๋Š” ๊ฒƒ๋“ค์ด ์žˆ๋Š”์ง€ ๋ฆฌ์„œ์น˜๋ฅผ ํ–ˆ๊ณ ์š”. ์œ„์ ฏ์œผ๋กœ ๋งŒ๋“œ๋Š” ๋ฐฉ๋ฒ• ์™ธ์˜ ๋ฐฉ๋ฒ•์„ ์ฐพ์•˜๋‹ต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‹ค ๋งŒ๋‚œ ์•„๋ž˜ ๋ธ”๋กœ๊ทธ! ํฌ์ŠคํŒ…!!! ์ €์—๊ฒŒ ์ •๋ง ๋งŽ์€ ๋„์›€์„ ์ค€ ํฌ์ŠคํŒ…์ด๋ž๋‹ˆ๋‹ค. ์ด๋Ÿฐ ๋ฐฉ๋ฒ•์ด ์žˆ์—ˆ๋„ค?!?! ๋ผ๋ฉฐ '์ง„์ฝ”'๋‹˜์˜ ํฌ์ŠคํŒ…์„ ์ •๋ง ๋งŽ์ด ์ฐธ์กฐํ–ˆ์Šต๋‹ˆ๋‹ค. https://jin-co.tistor..
ํ…Œ์ŠคํŠธ 1 HTML ์‚ฝ์ž… ๋ฏธ๋ฆฌ๋ณด๊ธฐํ•  ์ˆ˜ ์—†๋Š” ์†Œ์Šค
test1 HTML ์‚ฝ์ž… ๋ฏธ๋ฆฌ๋ณด๊ธฐํ•  ์ˆ˜ ์—†๋Š” ์†Œ์Šค
์˜ค๋Š˜ ํ•œ ์ผ ๐Ÿ’ป ios ๋””๋ฒ„๊น… + ์˜ค๋ฅ˜ํ•ด๊ฒฐ ๋ฆฌ์•กํŠธ๋กœ ์›น๋งŒ ๋งŒ๋“ค๋‹ค๊ฐ€ ์›น๋ทฐ ํ”„๋กœ์ ํŠธ๋ฅผ ์‹œ์ž‘ํ•ด์„œ ์ด์ œ ios ๋””๋ฒ„๊น…์„ ํ•˜๊ฒŒ ๋˜์—ˆ๋Š”๋ฐ, ์‹ ๊ธฐ๋ฐฉ๊ธฐ! ใ…Žใ…Žใ…Ž ์žญ์œผ๋กœ ์—ฐ๊ฒฐํ•ด์„œ ๋งฅ๋ถ์œผ๋กœ ๋””๋ฒ„๊น…ํ•˜๋Š”๋ฐ ์˜ˆ์ „์— react-native๋กœ ํ•˜๋˜ ๊ฒƒ๊ณผ๋Š” ๋‹ค๋ฅด๊ฒŒ ๋Š๊ปด์กŒ๋‹ค. ์‹ค์ œ ์ƒ์šฉ๋  ํ”„๋กœ์ ํŠธ๋ผ์„œ ๊ทธ๋Ÿฐ๊ฑธ๊นŒ - ๋””๋ฒ„๊น…ํ•˜๋ฉด์„œ ์ฐพ์•„๋‚ธ ์˜ค๋ฅ˜๋“ค๋„ ํ•˜๋‚˜ ๋‘˜์”ฉ ์ฒ˜๋ฆฌํ•˜๋ฉด์„œ ๋น„์Šทํ•œ ๋ฅ˜์˜ ํ”„๋กœ์ ํŠธ๋„ ์ฒซ ๋ฐœ์„ ๋‚ด๋”›์—ˆ๋‹ค. ๐Ÿ’ช๐Ÿป ์˜ค์šด์™„ ํ™ˆํŠธ๋กœ ํ•˜๋ฃจ์— 30๋ถ„ ์ด์ƒ ์šด๋™ ๋‹ฌ์„ฑ! ๐Ÿ“– Flipped ์ฝ์–ด๋ณด๊ณ  ์‹ถ๋˜ ์ฑ…์ด ์ €๋ ดํ•œ ๊ฐ€๊ฒฉ์œผ๋กœ ๋‚˜์™€์„œ ๋ฐ”๋กœ ๊ฒŸ!! ์˜ค๋Š˜๋ถ€ํ„ฐ ์ฃผํ–‰์‹œ์ž‘! ์งง์€ ๋ฆฌ๋ทฐ html2canvas ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฒ•์„ ์ž˜ ๋ชจ๋ฅด๋Š”๋ฐ, ๊ทธ๋ฆฌ๊ณ  ์ฐธ ์˜› ๊ฒƒ์ด๋ผ๋Š” ์ƒ๊ฐ์„ ๋งŽ์ด ํ–ˆ๋Š”๋ฐ, ๊ฐ€๋”์€ ์˜› ๊ฒƒ์ด ๋” ์ข‹์„ ๋•Œ๊ฐ€ ์žˆ๋Š” ๊ฒƒ ๊ฐ™๋‹ค. ๋‚ด์ผ ํ•  ์ผ ๋ธ”๋กœ๊ทธ ๋‹ค๊ตญ์–ด ์ง€์›๊ด€..
โ€ผ๏ธ ๋ฌธ์ œ์ƒํ™ฉ canvas๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์ด๋ฏธ์ง€๋ฅผ ๊ทธ๋ฆฌ๊ณ  ๊ทธ๋ ค์ง„ ์ด๋ฏธ์ง€๋ฅผ ์บก์ณํ•˜๋Š” ์ž‘์—…์„ ํ•˜๋Š”๋ฐ, ์›น์ƒ์—์„œ ํฌ๋กฌ์œผ๋กœ ๊ฐœ๋ฐœํ•  ๋•Œ๋Š” ์ž˜ ๋˜๋Š”๋ฐ, ๋ฐฐํฌ ํ›„์— ios ์‚ฌํŒŒ๋ฆฌ์—์„œ ํ…Œ์ŠคํŠธํ•˜๋ฉด ๋ชจ๋“ ๊ฒƒ์ด ํ•˜์–—๊ฒŒ ๋‚˜์˜ค๋Š” ํ˜„์ƒ์ด ๋ฐœ์ƒํ–ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋“ฑ์žฅํ•˜๋Š” ์˜ค๋ฅ˜ ๋ฉ”์„ธ์ง€ Unable to get image data from canvas because the canvas has been tainted by cross-origin data CORS ์˜ค๋ฅ˜๊ฐ€ ๋‚˜๋Š” ๊ฒƒ์ด๋‹ค. ์ด๋ฏธ์ง€ ๋„๋ฉ”์ธ๊ณผ์˜ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” ๋“ฏ ํ–ˆ๋‹ค. html2Canvas ์˜ต์…˜๋„ ๋”ํ•ด๋ณด๊ณ  ์ด๋ฆฌ์ €๋ฆฌ ์ฐพ์•„๋ณด๋‹ค ์ฐพ์€ ํ•ด๊ฒฐ์ฑ…์€!!!!! โœ… Solution var url = 'http://url'; var imgObj = new Image(); imgObj.src = url + ..
๋ฐ(Ming) ๐Ÿฐ
'๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก (4 Page)