목록Web Development/Node.js (1)
what i learned
[Node.js] 프로젝트 생성 후 초기 세팅하기
1. express 프로젝트 생성하기 npm 전역설치 $ npm i -g express-generator $ express 프로젝트명 생성한 프로젝트에 들어가서 $ cd 프로젝트 서버를 돌리기 위해 필요한 것 설치 $ npm i 서버 계속 돌리기 위한 패키지 설치 $ npm install -D nodemon +) nodemon을 설치했다면 package.json 파일에서 nodemon으로 수정해야한다. "scripts": { "start": "nodemon ./bin/www" }, 2. 필요한 폴더 및 파일 생성하기 1) .env 파일 생성 (환경변수를 관리하는 파일) DATABASE = 데이터베이스명 PASSWORD = MySQL비밀번호 USERNAME = root HOST = localhost//lo..
Web Development/Node.js
2022. 8. 19. 01:01