๐Ÿ’ป๊ธฐ์ˆ 

    ๋งฅ ๋ฏธ๋‹ˆ๋กœ ํ™ˆ์„œ๋ฒ„๋ฅผ ๊ตฌ์ถ•ํ•˜๋ฉฐ #2

    ์ด์ „ ๊ธ€ 1ํŽธ์€ ๋งฅ๋ฏธ๋‹ˆ๋ฅผ ์‚ฌ๊ฒŒ ๋œ ๊ฒฐ์ •์ ์ธ ์ด์œ ์™€, ํ™ˆ์„œ๋ฒ„์˜ ๋ชฉ์ ์ด ๊ธฐ๋ก๋œ ๊ธ€์ด๋‹ค. ์ด ํฌ์ŠคํŠธ๋Š” ์ง€๊ธˆ๊นŒ์ง€ ์–ด๋–ค ์กฐ๊ฑด์—์„œ ํ™ˆ์„œ๋ฒ„๋ฅผ ์šด์˜ํ•ด์™”๊ณ , ๋Œ€๋žต 4๋…„๊ฐ„ ํ™ˆ์„œ๋ฒ„ 3๋Œ€๋ฅผ ๋Œ๋ ค๋ณธ ์‚ฌ๋žŒ์œผ๋กœ์„œ ํ™ˆ์„œ๋ฒ„์˜ ์„ ์ •๊ธฐ์ค€์„ ๊ณต์œ ํ•˜๋ ค๊ณ  ํ•œ๋‹ค. https://devent.tistory.com/174 Mac mini๋กœ ํ™ˆ์„œ๋ฒ„๋ฅผ ๊ตฌ์ถ•ํ•ด๋ณด๋ฉฐ #1 ์‚ฌ๊ฑด์˜ ๋ฐœ๋‹จ ์ง€๋‚œ 3๋…„๊ฐ„ LG 14์ธ์น˜ ๊ทธ๋žจ๊ณผ HP ๋…ธํŠธ๋ถ 2๋Œ€๋กœ ํ™ˆ์„œ๋ฒ„๋ฅผ ๊ตฌ์„ฑํ–ˆ์—ˆ๋‹ค. ๊ทธ๋Ÿฌ๋˜ ์ค‘ ์˜ค๋žœ ๊ธฐ๊ฐ„ ํ”Œ๋Ÿฌ๊ทธ๊ฐ€ ๊ฝ‚ํžŒ ์ฑ„๋กœ ๋ฐฐํ„ฐ๋ฆฌ ๊ณผ์—ด์ด ์ƒ๊ธฐ๊ฒŒ ๋˜์—ˆ๊ณ  ๊ฒฐ๊ตญ ๋ฐฐํ„ฐ๋ฆฌ๊ฐ€ ๋ถ€ํ’€์–ด ์˜ค๋ฅด๋Š” ํ˜„์ƒ์ด ๋ฐœ devent.tistory.com ๋งฅ ๋ฏธ๋‹ˆ ์„œ๋ฒ„๋ฅผ ๊ตฌ์ถ•ํ•˜๊ธฐ ๊นŒ์ง€ LG ๊ทธ๋žจ 14์ธ์น˜๋กœ๋Š” ๊ฐ„๋‹จํ•œ ์›น์„œ๋ฒ„๋ฅผ ๊ตฌ์ถ•ํ•˜๋Š”๋ฐ ๋ฌธ์ œ๊ฐ€ ์—†์—ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๋™์‹œ์ ‘์†์ž๊ฐ€ ๋Š˜๊ณ  ์‚ฌ์ดํŠธ์˜ ํŠธ๋ž˜ํ”ฝ์ด ๋ฌด๊ฑฐ์›Œ์ง€๋ฉด์„œ ์ ์ฐจ ๋ถ€..

    [ NodeJS ] Webpack + SASS ์„ค์ •ํ•˜๊ธฐ

    SASS ๊ธฐ์กด ์›นํŽ˜์ด์ง€์— ์Šคํƒ€์ผ์„ ์ ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” CSS๋กœ ํ•˜๋‚˜ํ•˜๋‚˜ ๋ณ€๊ฒฝํ•ด์ฃผ์–ด์•ผ ํ•˜๋Š” ๋ฒˆ๊ฑฐ๋กœ์›€์ด ์žˆ๋‹ค. ์ด ๊ฐ™์€ CSS์˜ ๊ฐœ๋ฐœ ํŽธ์˜์„ฑ์„ ๋†’์ด๊ธฐ ์œ„ํ•ด ๋“ฑ์žฅํ•œ SASS, ํ”„๋ฆฌํ”„๋กœ์„ธ์„œ ์Šคํฌ๋ฆฝํŠธ ์–ธ์–ด์ด๋‹ค. CSS์˜ ๊ฒฝ์šฐ HTMLํ™˜๊ฒฝ์— style ํƒœ๊ทธ๋งŒ ์ง€์ •ํ•ด์ฃผ๋ฉด ๋ฐ”๋กœ ๋กœ๋“œ๊ฐ€ ๋˜๋Š”๋ฐ ์ด SASS๋ž€ ๋…€์„์€ ๊ทธ๋ ‡์ง€๊ฐ€ ์•Š๋‹ค. ์‚ฌ์šฉํ•˜๊ธฐ ์ „์— CSS๋กœ ์ปดํŒŒ์ผํ•˜๋Š” ๊ณผ์ •์ด ํ•„์ˆ˜๋‹ค. ๊ทธ๋ž˜์„œ ๋ณดํ†ต ์›นํŒฉ๊ณผ ํ•จ๊ป˜ ์‚ฌ์šฉ๋œ๋‹ค. 1. ํ•„์š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์„ค์น˜ npm i webpack webpack-cli sass sass-loader style-loader mini-css-extract-plugin css-loader ์„ค์น˜๋ฅผ ์™„๋ฃŒํ•ด์ฃผ๋ฉด ์›นํŒฉ ์„ค์ •ํŒŒ์ผ์„ ๋งŒ๋“ค์–ด์ค€๋‹ค. 2. webpack.config.js import MiniCssExtract..

    Mac mini๋กœ ํ™ˆ์„œ๋ฒ„๋ฅผ ๊ตฌ์ถ•ํ•ด๋ณด๋ฉฐ #1

    ์‚ฌ๊ฑด์˜ ๋ฐœ๋‹จ ์ง€๋‚œ 3๋…„๊ฐ„ LG 14์ธ์น˜ ๊ทธ๋žจ๊ณผ HP ๋…ธํŠธ๋ถ 2๋Œ€๋กœ ํ™ˆ์„œ๋ฒ„๋ฅผ ๊ตฌ์„ฑํ–ˆ์—ˆ๋‹ค. ๊ทธ๋Ÿฌ๋˜ ์ค‘ ์˜ค๋žœ ๊ธฐ๊ฐ„ ํ”Œ๋Ÿฌ๊ทธ๊ฐ€ ๊ฝ‚ํžŒ ์ฑ„๋กœ ๋ฐฐํ„ฐ๋ฆฌ ๊ณผ์—ด์ด ์ƒ๊ธฐ๊ฒŒ ๋˜์—ˆ๊ณ  ๊ฒฐ๊ตญ ๋ฐฐํ„ฐ๋ฆฌ๊ฐ€ ๋ถ€ํ’€์–ด ์˜ค๋ฅด๋Š” ํ˜„์ƒ์ด ๋ฐœ์ƒํ•˜๊ฒŒ ๋œ๋‹ค. ์‚ฌ์‹ค ์กฐ๋งŒ๊ฐ„ ๋…ธํŠธ๋ถ ์„œ๋ฒ„์—์„œ ๋ฏธ๋‹ˆ PC ์„œ๋ฒ„๋กœ ๊ฐˆ์•„ํƒˆ ์˜ˆ์ •์ด์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ๊ณง๋ฐ”๋กœ ํ๊ธฐ ์ฒ˜๋ถ„ํ–ˆ๋‹ค. ์ดํ›„ ๊ณ ๋Œ€ํ•˜๋˜ ๋งฅ๋ฏธ๋‹ˆ๋ฅผ ์˜์ ‘ํ•˜๋ฉฐ ๋ณ„๋‹ค๋ฅธ ๊ณ ๋ฏผ ์—†์ด 24์‹œ๊ฐ„ ์ƒ์‹œ ๊ณ ๋ฌธ์‹ค(?)๋กœ ๋“ค์–ด๊ฐ€๊ฒŒ ๋˜์—ˆ๋‹ค. (์‚ฌ..์‚ฌ์•Œ... ์‚ด๋ ค์ค˜ใ…“ใ…“...) ์ฐธ๊ณ ๋กœ 24์‹œ๊ฐ„ ์ผœ์ ธ์žˆ๋Š” ์„œ๋ฒ„์šฉ์ด๋ผ ์ดˆ๊ธฐ์— ์„ธํŒ…ํ•  ๋•Œ ์ œ์™ธํ•˜๊ณ ๋Š” ๋ชจ๋‹ˆํ„ฐ ์—ฐ๊ฒฐ๋„ ์ œ์™ธํ•ด๋†“์•˜๋‹ค. ๊ทธ๋Ÿฌ๋ฉด ์„œ๋ฒ„ ๊ด€๋ฆฌ๊ฐ€ ํž˜๋“ค์–ด์ง€๊ธฐ์— VNC ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•ด์„œ ์›๊ฒฉ ์ ‘์†์œผ๋กœ ๊ด€๋ฆฌํ•œ๋‹ค. ๊ธฐ์กด์— ๋งฅ๋ถ์ด ์žˆ์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ํฌ๋กฌ์œผ๋กœ vnc:// ์ฃผ์†Œ๋ฅผ ์ž…๋ ฅํ•˜๊ธฐ๋งŒ ํ•˜๋ฉด ๋œ๋‹ค. ๋…ธํŠธ๋ถ ์„œ๋ฒ„ vs ๋งฅ๋ฏธ..

    ๋‚ด๊ฐ€ ์‹ ๊ธฐ์ˆ  ๋„์ž…์— ์žˆ์–ด ์ค‘์š”ํ•˜๊ฒŒ ์ƒ๊ฐํ•˜๋Š” ์›์น™

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

    Prometheus + Node Exporter ์—ฐ๋™ํ•˜๊ธฐ

    ์š”์•ฝ ํ”„๋กœ๋ฉ”ํ…Œ์šฐ์Šค๋Š” ์˜คํ”ˆ์†Œ์Šค ์‹œ์Šคํ…œ ๋ชจ๋‹ˆํ„ฐ๋ง ํˆด์ด๋‹ค. ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํ™˜๊ฒฝ์„ ์šด์šฉํ•˜๋Š” ์‹œ์Šคํ…œ์ด๋ผ๋ฉด ํ”„๋กœ๋ฉ”ํ…Œ์šฐ์Šค๋ฅผ ์‚ฌ์šฉํ•˜๋ผ๊ณ  ๊ถŒ์žฅํ•  ์ •๋„๋กœ ๋„๋ฆฌ ์‚ฌ์šฉ๋˜๊ณ  ์žˆ๋‹ค. ํ”„๋กœ๋ฉ”ํ…Œ์šฐ์Šค๊ฐ€ ๋งคํŠธ๋ฆญ ์ˆ˜์ง‘์„ ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ์ต์Šคํฌํ„ฐ๋ผ๋Š” ํ”„๋กœ์„ธ์Šค๋ฅผ ๋‘๊ฒŒ ๋œ๋‹ค. ๋‹ค๋ฅธ ๋ชจ๋‹ˆํ„ฐ๋ง ํˆด๊ณผ ๋‹ค๋ฅธ ์ ์€ push๊ฐ€ ์•„๋‹Œ pull ๋ฐฉ์‹์œผ๋กœ ๋งคํŠธ๋ฆญ์„ ์ˆ˜์ง‘ํ•œ๋‹ค๋Š” ์ ์ด๋‹ค. ์ด๋•Œ ์ต์Šคํฌํ„ฐ ์„œ๋ฒ„๋Š” ์ „์†ก ์Šค์ผ€์ค„ ๋ถ€ํ•˜๋ฅผ ์‹ ๊ฒฝ ์“ฐ์ง€ ์•Š์•„๋„ ๋œ๋‹ค๋Š” ์žฅ์ ์ด ์žˆ๋‹ค. ํ”„๋กœ๋ฉ”ํ…Œ์šฐ์Šค ์„ค์น˜&์‹คํ–‰ ๋งฅ OS์—์„œ ๊ตฌ๋™๋  ์˜ˆ์ •์ด๊ธฐ ๋•Œ๋ฌธ์— homebrew๋ฅผ ์ด์šฉํ•˜๊ฒ ๋‹ค. ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ด์„œ ์„ค์น˜ ํ›„ ์‹คํ–‰์„ ํ•ด๋ณด์ž. ์ดํ›„ http://localhost:9090/ ๋กœ ์ ‘์†ํ•ด์„œ ์ •์ƒ ์ž‘๋™ํ•˜๋Š”์ง€ ํ™•์ธํ•˜๋ฉด ๋œ๋‹ค. brew install prometheus brew services start..

    [ NodeJS ] winston ์ฝ˜์†”์—์„œ ์ƒ‰์ƒ ์ง€์ •ํ•˜๊ธฐ

    winston ์„ค์น˜ ๋ฐ ์„ค์ • ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ด์„œ ์„ค์น˜ํ•ด์ค๋‹ˆ๋‹ค. npm i winston ์ฝ”๋“œ ์„ค์ • import winston from 'winston'; import dayjs from 'dayjs'; const messageSymbol = Symbol.for('message'); const colorset = { "INFO": "\x1b[34m[ %s ]\x1b[0m", "ERROR": "\x1b[31m[ %s ]\x1b[0m", "WARN": "\x1b[33m[ %s ]\x1b[0m" } export async function init () { winston.configure({ level: 'info', format: winston.format.combine( winston.format(func..

    [ NodeJS ] TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".json" ์—๋Ÿฌ

    ํ•ด๊ฒฐ๋ฐฉ๋ฒ• ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์€ ์ •๋ง ๊ฐ„๋‹จํ•˜๋‹ค. node --experimental-json-modules app.js ๋งŒ ๋ถ™์—ฌ์ฃผ๊ณ  ์‹คํ–‰ํ•˜๋ฉด ๋œ๋‹ค.

    [ Webpack5 ] export 'default' was not found in ์—๋Ÿฌ

    ERROR in ./frontend/public/js/handle.js 10:0-31 export 'default' (reexported as 'Feeds') was not found in './feeds.js' (possible exports: Feeds) webpack 5.72.0 compiled with 1 error in 112 ms ์›นํŒฉ์—์„œ ํด๋ž˜์Šค๋ฅผ ์ž„ํฌํŠธ ํ•  ๋•Œ ์œ„์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋œฐ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋•Œ ์ž„ํฌํŠธ ํ•  ํด๋ž˜์Šค๋ฅผ export default class๋กœ ์„ค์ •ํ•ด์ฃผ์‹œ๋ฉด ์—๋Ÿฌ๊ฐ€ ํ•ด๊ฒฐ๋ฉ๋‹ˆ๋‹ค. โŒ ์—๋Ÿฌ ์ฝ”๋“œ export class Feeds { constructor(token) { this.token = token } ... } ๐Ÿ‘ ์ˆ˜์ • ์ฝ”๋“œ export default class Feeds { ..