express: https://expressjs.com/en/starter/hello-world.html
Express "Hello World" example
Hello world example Embedded below is essentially the simplest Express app you can create. It is a single file app — not what you’d get if you use the Express generator, which creates the scaffolding for a full app with numerous JavaScript files, Jade
expressjs.com
index.js express모듈 복붙(->가져온다)
오류1
npm ERR! Missing script: "start"
npm ERR!
npm ERR! Did you mean one of these?
npm ERR! npm star # Mark your favorite packages
npm ERR! npm stars # View packages marked as favorites
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
누락된 스크립트 오류라고 생각하고 검색->https://bobbyhadz.com/blog/npm-missing-script-start 사이트를 참고
먼저 스크립트 오타를 확인했고 혹시? 저장인가 해봤는데 성공
오류2
궁금증1
강의와 다르게 package-lock.json이 있는데 이건 뭘까
https://hyunjun19.github.io/2018/03/23/package-lock-why-need/ 사이트로 해결
'Node.js' 카테고리의 다른 글
04. 네트워크 기초 및 서버 만들기 (0) | 2024.02.12 |
---|---|
03. path, File System 모듈과 스트림 (0) | 2024.02.12 |
02.자바스크립트 기초 문법과 모듈 (1) | 2024.01.31 |
[서평] Do it! Node.js 프로그래밍 입문 (0) | 2023.11.27 |
VScode에서 알아두면 유용한 깃허브 (0) | 2023.10.31 |