25.09.11 목요일 18일차 (트리뷰)
·
AWS 광주 개발일지(25.08.19~25.01.20)/교육 25년 9월 일지
파일 시스템 트리 구조
Tree View
·
Linux
Tree View body { font-family: Arial, sans-serif;} .folder { cursor: pointer; font-weight: bold;} .children { margin-left: 20px; display: none;} .open > .children { display: block; // 1. JSON 데이터const treeData = [ { name: 'Root', children: [ { name: 'src', children: [ { na..
특정 요소 숨기는 기능 classList.toggle() 사용.
·
FrontEnd/JavaScript
JavaScriptbtnClacRecord.addEventListener('click', () => { const record = document.getElementById("calc-record"); record.classList.toggle("hidden-record");}); CSS#calc-record{ border-radius: 0.5em; border: none; resize: none; height: 22em; width: 18.6em; position:absolute; background-color:beige;}.hidden-record { display: none;} HTML 동작 원리는 JavaScript에서 HTML에 있는 특정 요..
실무에서 자주 쓰는 리눅스 필수 명령어 (grep, find, tail, head) + (df, ps, top, netstat)
·
AWS
1. grep : 원하는 특정 텍스트를 검색할 때 주로 사용.주요 사용 사례에러 로그 찾기 : 서비스 장애가 발생했을 때, 가장 먼저 로그 파일에서 ERROR나 Exception과 같은 키워드를 검색. - i 대소문자를 무시 (ignore case) - C [숫자] : 찾은 줄의 주변 (Context) 라인을 함께 출력특정 API 요청 기록 확인 : 사용자의 요청이 서버에 제대로 들어왔는지 확인할 때, 특정 API 경로 (URI)나 사용자 ID를 검색 2. find : 특정 조건 (이름, 크기, 수정, 시간 등)에 맞는 파일이나 디렉토리를 지정한 위치부터 하위 디렉토리까지 모두 검색 가능.주요 사용 사례특정 설정 파일 찾기 : 서버의 수많은 디렉토리 중에서 httpd.conf나 applicatio..
25.09.10 수요일 17일차 ()
·
AWS 광주 개발일지(25.08.19~25.01.20)/교육 25년 9월 일지
// server.jsconst http = require('http');const fs = require('fs');const path = require('path');function calculate(expression) { const tokens = expression.match(/(\d+(\.\d+)?|[+\-*/%])/g); if (!tokens) return null; // 곱셈/나눗셈/나머지 먼저 let stack = []; let i = 0; while (i { res.setHeader('Access-Control-Allow-Origin', '*'); res.setHeader('Access-Control-Allow-Methods', 'GET, P..
25.09.09 화요일 16일차 (날씨 위젯 만들기)
·
AWS 광주 개발일지(25.08.19~25.01.20)/교육 25년 9월 일지
DOCTYPE html>html lang="en">head> meta charset="UTF-8"> meta name="viewport" content="width=device-width, initial-scale=1.0"> title>Documenttitle> link rel="stylesheet" href="style.css">head>body> button class="button" type="button">현재 날씨는?button> dl> dt>기온dt> dd class="temperature">dd> dt>위치dt> dd class="place">dd> dt>설명dt> dd class="description">..
25.09.08 월요일 교육 15일차 (Docker-Node.js 실습)
·
AWS 광주 개발일지(25.08.19~25.01.20)/교육 25년 9월 일지
기본적으론 복습을 했고 중간에 이제껏 배운 내용을 토대로 docker를 이용해 node.js 서버 열기를 실습했다.처음에는 도저히 이해가 되지 않았지만 정리해두었던 이전 학습자료를 찬찬히 살펴보니 힌트가 있었다.바로 이미지 파일을 생성하는 것1. 우선 visual code를 이용해 node.js 파일을 생성한다. 파일 내용은 기존에 수업시간에 배웠던 서버를 여는 것과 파일을 서빙해주는 코드 그리고선행 - 모듈을 받기 위한 npm init -y - npm install http - npm install fs - npm install path2. 파일을 c드라이버에 폴더를 하나 생성하고 거기에 모두 넣어준다. 나중에 실행하기 편하게 하기 위해서. 3. Dockerfile 을 생성 일단 메모장으로 작성하고 아..
CMD Docker 기능을 이용해 Node.js 서버 띄우기 순서
·
AWS
1. 우선 visual code를 이용해 node.js 파일을 생성한다. 파일 내용은서버를 여는 것과 파일을 서빙해주는 코드 // server.jsconst http = require('http');const fs = require('fs');const path = require('path');const server = http.createServer((req, res) => { // CORS 헤더 설정 (모든 출처에서의 요청 허용) res.setHeader('Access-Control-Allow-Origin', '*'); res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS'); res.se..