๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
728x90
๋ฐ˜์‘ํ˜•

studies/Front-end19

[Node.js] ajax SyntaxError: Unexpected end of JSON input ์—๋Ÿฌ ํ•ด๊ฒฐ ํ”„๋ก ํŠธ ๋‹จ์—์„œ ajax๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ๋„˜๊ฒจ์ฃผ์—ˆ์œผ๋‚˜ ๊ณ„์† ์ œ๋ชฉ๊ณผ ๊ฐ™์€ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค. dataType์„ text๋กœ ์ฃผ๋ฉด ๋„˜์–ด๊ฐ€๊ธด ํ•˜๋‚˜ ์„œ๋ฒ„๋‹จ์—์„œ๋Š” ์•„๋ฌด ๋ฐ์ดํ„ฐ๋„ ๋ฐ›์ง€ ๋ชปํ•œ๋‹ค.$.ajax({ url: '/chat', type: 'POST', data: {port: $port}, dataType: 'json', ์•„๋ž˜ ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•œ๋‹ค.const bodyParser = require("body-parser");//app.use(bodyParser.urlencoded({ extended: true })); bodyparser๋„ ์‚ฌ๋ผ์ง€๋ ค๋Š”์ง€ ๊ฒฝ๊ณ ๊ฐ€ ๋– ์„œ ๋งจ์•„๋ž˜ ๋‘์ค„๋กœ ๋Œ€์ฒดํ•œ๋‹ค.  ๋…ธ๋“œ/js 2021. 8. 21.
[React] ๋ฆฌ์•กํŠธ babel ์ฒซ ์‚ฌ์šฉ๊ณผ ์‹คํ–‰ํ•˜๊ธฐ index.html   app.jsclass Codelab extends React.Component{ render(){ return( ๋ฐ˜๊ฐ‘์Šต๋‹ˆ๋‹ค. ํ•˜ํ•˜ํ•˜ํ•˜ํ•ณ ) }}class App extends React.Component{ render(){ return( ) }}ReactDOM.render(, document.getElementById('root'))  ์‹คํ–‰ํ•˜๊ธฐnpm i -g http-serverhttp-server . ์ ‘์†http://127.0.0.1:8081* ํฌํŠธ๋ฒˆํ˜ธ๋Š” ๊ธฐ๊ธฐ๋งˆ๋‹ค ๋‹ค๋ฅผ ์ˆ˜ ์žˆ๋‹ค.   React.js 2021. 6. 29.
[CSS] bootstrap nav nav-pills nav-fill color change ์ƒ‰์ƒ ๋ณ€๊ฒฝ ์•„๋ž˜ ์ฝ”๋“œ ์‚ฌ์šฉ ๋ฐ”๋น ์„œ ๊ธ‰ํ•œ ํฌ์ŠคํŒ…..nav-pills > .nav-item > .active { color: rgb(73, 80, 102) !important; background-color: rgb(194, 197, 223) !important; } 2021. 4. 13.
[Spring] Pom.xml line1 Maven Configuration Problem Unknown error ํ•ด๊ฒฐ/Spring boot/Maven ์–ด์ œ ์Šคํ”„๋ง๋ถ€ํŠธ๋ฅผ ์ข€ ๋งŒ์กŒ๋Š”๋ฐ, ์—๋Ÿฌํ•ด๊ฒฐ์— ์ข€ ์‹œ๊ฐ„์„ ์ผ๋‹ค. ์ง€๊ธˆ ์ž‘์„ฑํ•˜์ง€ ์•Š์œผ๋ฉด ์•ž์œผ๋กœ ์ž‘์„ฑํ•˜์ง€ ์•Š์„๊ฒƒ๊ฐ™์•„ ๊ธฐ๋ก์„ ๋‚จ๊ธด๋‹ค.   * java ver 11, spring-boot-starter 2.4.0, elipseIDE ๊ธฐ์ค€   pom.xml์„ ์—ด์–ด๋ณด๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ถ€๋ถ„์ด ์žˆ๋‹ค. ๊ธฐ์กด์˜ ๋ชจ์Šต์ด์—ˆ๋‹ค. 11  ๋‚ด Maven์ด ๋ฌด์Šจ ๋ฒ„์ „์ธ์ง„ ์ •ํ™•ํžˆ ๊ธฐ์–ต์ด ์•ˆ๋‚˜์ง€๋งŒ, ๊ทธ๊ฑด ๋”ฑํžˆ ์ƒ๊ด€์—†๋Š” ๋“ฏ ํ•˜๋‹ค. ์•„๋ž˜์™€ ๊ฐ™์ด 3๋ฒˆ์งธ ํ–‰์„ ์ถ”๊ฐ€ํ•ด์ค€๋‹ค. 3.1.1 ? ๋ฌด์Šจ ์˜๋ฏธ์ผ๊นŒ? ์ตœ์‹ ๋ฒ„์ „์ธ๊ฐ€... 11 3.1.1  ๊ทธ๋Ÿฐ ๋‹ค์Œ ํ”„๋กœ์ ํŠธ ์šฐํด๋ฆญ>Maven>Update...(project) ์—…๋ฐ์ดํŠธ ์–ด์ฉŒ๊ณ ๋ฅผ ๋ˆŒ๋Ÿฌ์ค€ ํ›„ Maven ์—…๋ฐ์ดํŠธ๋ฅผ ํ•ด์ค€๋‹ค. ๋‚˜๋Š” ์ด๋ ‡๊ฒŒ ํ•˜์—ฌ ์œ„์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ์‚ฌ๋ผ์กŒ๋‹ค! ๋Œ“๊ธ€์€ ์–ธ์ œ๋‚˜ ํ™˜์˜์ž…๋‹ˆ๋‹ค. 2021. 4. 1.
[Node.js] express ๊ฐ„ํŽธ ์„œ๋ฒ„ ์‹คํ–‰ํ•˜๊ธฐ, ์„œ๋ฒ„ ์‹คํ–‰ ํŒŒ์ผ ๋งŒ๋“ค๊ธฐ (VS CODE) express ์„ค์น˜ ์ต์Šคํ”„๋ ˆ์Šค๊ฐ€ ์™œ ํ•„์š”ํ•œ๊ฐ€?const http = require('http');const hostname = '127.0.0.1';const port = 3000;const server = http.createServer((req, res) => { res.statusCode = 200; res.setHeader('Content-Type', 'text/plain'); res.end('Hello World');});server.listen(port, hostname, () => { console.log(`Server running at http://${hostname}:${port}/`);});์ด๊ฒƒ์€ node.js ๊ณต์‹ ๋ฌธ์„œ ์•ˆ๋‚ด ํŽ˜์ด์ง€์˜ ์„œ๋ฒ„ ์ƒ์„ฑ ์ฝ”๋“œ์ด๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์•„๋ž˜๋Š” exp.. 2021. 3. 10.
[Node.js] Uncaught Error: listen EADDRINUSE: address already in use ํ•ด๊ฒฐ / ์„œ๋ฒ„ ์ข…๋ฃŒ vs code๋กœ ์‹คํ–‰ํ•˜๋Š” ๊ฒฝ์šฐ, TERMINAL-cmd ํ˜„์žฌ node.jsํด๋” ๊ฒฝ๋กœ์—์„œ ์•„๋ž˜ ๋ช…๋ น ์ž…๋ ฅTaskkill /IM node.exe /F 2021. 3. 10.
728x90
๋ฐ˜์‘ํ˜•