TIL
2023. 4. 19.
TIL #027
오늘 한 것
[Project] BookStack 📚✨
- StackDetail prop type 정리
- QuoteStack 관련 컴포넌트 CSS 변경
(QuoteCard, QuoteCreateCard, QuoteStack) - QuoteStack Create API 및 로직 구현
오늘 배운 것
포트에서 실행중인 프로그램 찾기 : lsof
명령어
$ lsof -i :PORT_NUMBER
결과
// result example
COMMAND PID USER FD TYPE DEVICE
node 1234 shaking 15u IPv4 0x1f23462a48d69d650t0
포트에서 실행중인 프로그램을 강제 종료하기 : kill
$ kill -9 PID_NUMBER
// example
$ ㅏㅑㅣㅣ -9 1234
Express 동적 라우팅
// :id를 동적으로 가져올 수 있음
app.get("/users/:id", (request, repones) => {
const userName = users[request.params.id - 1];
repones.end(`<h1>${userName}</h1>`);
});
오늘 느낀 점
혼자 있을 때 가장 힘든 것은 바로 흔들리지 않고 스스로를 믿는 것.