https://www.youtube.com/watch?v=H7_3UlasQeI
요약 서버에서 헤더에 붙여주기, nextjs나 vite 사용하면 config에서 프록시 달아주기
express 셋팅법
npm init -y
npx tsc -init
noImplicitOverride": true
target 는 최신으로 바꾸기
express는 types도 받아주기
"devDependencies": {
"@types/express": "^5.0.0",
"@types/node": "^22.7.8",
"prettier": "^2.2.1",
"tsc": "^2.0.3",
"tsc-watch": "^4.2.9",
"typescript": "^5.6.3"
},
"dependencies": {
"express": "^5.0.1"
}
"scripts": {
"build": "tsc",
"start:dev": "tsc-watch --onSuccess \\"node dist/app.js\\"",
"prestart": "npm run build",
"start": "node dist/app.js"
},
위처럼 설정해주면 기본 script는 완