목록2024/08/13 (5)
wintertreey 님의 블로그
깃허브에서 개인브랜치 생성하기 로컬작업공간(노트북, 컴퓨터)에서 깃허브 레퍼지토리 세팅하기 프로젝트 작업공간으로 새로운 폴더 생성하기.해당 작업공간 폴더에 들어와 깃 배시 열기 git initGit 초기화깃 시작 명령어 git clone https://github.com/username/repository.git 깃허브에 만들어진 폴더 그자체와 브랜치들이 다 들어온다. 개인브랜치 생성같은 작업을 할 필요가 없다. 혹은 세부적으로 작업해주고 싶다면... 하단의 remote~~ 부터 명령어들을 적어주면 된다. (($ git remote add origin https://github.com/username/repository.git 원격 저장소 추가레퍼지토리 주소 연결 우리 팀 프로젝트의 단계별 깃..
css나 이미지는 static폴더 내에 위치해야한다. 이미지 파일 사이즈 제한주기. ++ 자동으로 refresh되도록 체크해두자 파일업로드package pack.controller;import org.springframework.web.multipart.MultipartFile;import lombok.Data;@Datapublic class UploadDto { private String myName; private MultipartFile myFile; //등록일 등 기타는 생략}package pack.controller;import org.springframework.stereotype.Component;import org.springframework.web.multipart.MultipartF..
c:\work2\node_ex>mkdir login-sessioncd login-session >npm init -y>npm i express>npm i ejs>npm i --save-dev nodemon>npm i express-session>npm i body-parser body-parser먼저 Parser는 무엇을 의미하는가?가지고 있는 데이터를 내가 원하는 형태의 데이터로 ‘가공'하는 과정을 parsing 이라 하며 그 과정을 수행하는 모듈 혹은 메소드를 parser 라 일컫는다.단순히 말하자면 내가 모르는 언어를 내가 원하는 언어의 구조로 바꿔주는 일종의 구문 해석기라고 말할 수도 있다.여기서 기억해야 할 것은 parser는 구문 해석을 할 뿐 번역을 하진 않는다. 번역의 역할은 compil..
c:\work2\node_ex>mkdir nodeserver1>cd nodeserver1 >npm init>npm i express>npm i --save-dev nodemon>npm i cors 다음은 폴더를 생성하고, 프로젝트를 생성시 설치한 모듈이다. express: Node.js에서 서버를 쉽게 구축할 수 있도록 도와주는 웹 프레임워크입니다. 간단한 라우팅, 미들웨어, 요청 처리 등을 지원합니다.nodemon: 개발 중에 파일 변경 시 자동으로 서버를 재시작해주는 도구입니다. 코드 변경 사항을 즉시 반영할 수 있어 개발이 용이합니다.cors: Cross-Origin Resource Sharing의 약자로, 서로 다른 출처(도메인) 간의 자원 공유를 허용하도록 서버를 설정하는 미들웨어입니다. 웹 애..
넘길정보가 담긴 파일import express from "express";import path from "path";import { fileURLToPath } from "url";import cors from "cors";const __filename = fileURLToPath(import.meta.url); //import.meta.url : 현재 파일의 경로const __dirname = path.dirname(__filename);const app = express();app.use(cors()); // cors 미들웨어 등록app.use(express.json()); //express.json 미들웨어. json 파싱용.app.set("port", process.env.PORT || 3000)..