- Today
- Total
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- sql
- MariaDB
- Git
- LEVEL 1
- 알고리즘
- 코딩테스트
- react
- 프로그래머스
- Err-Handling
- TWIL
- mongodb
- 면접을 위한 cs 전공지식 노트
- CRUD
- typescript
- 아고라스테이츠
- 리팩터링 2판
- 에러핸들링
- 코어 자바스크립트
- javascript
- CSS
- LEVEL1
- TMIL
- LEVEL 2
- 배포
- 오늘도 개발자가 안된다고 말했다
- java
- Docker
- Refactoring
- TIL
- First Project
Archives
성장에 목마른 코린이
[Node.js] 프로젝트 시작 기본 세팅 본문
728x90
1. node 설치 확인
node -v
2. npm init
package.json 추가됨
npm init
3. express 설치
node_modules 폴더와 package-lock.json 파일 추가됨
npm install --save express
4. 초기 파일 생성
index.js
const express = require('express');
const app = express();
const port = 5000;
app.get('/', function(req, res){
res.send('프로젝트 이름');
})
app.listen(port, () => console.log(`listening to ${port}`));
5. nodemon 설치 및 적용
"scripts": {
"start": "nodemon --inspect index.js"
}
6. .gitignore 생성
node_modules
dist/*
*.log
.DS_Store
.env
MariaDB 세팅 한다면 아래 제 블로그 링크 클릭
'Javascript > Node.js' 카테고리의 다른 글
[Node.js] Babel을 통해 ES5 -> ES6 사용하기 with nodemon (0) | 2022.11.23 |
---|---|
[Node.js] CryptoJS (설치, 암호화 방식, 사용) (0) | 2022.11.16 |
[Node.js] PM2 소개, 사용이유 및 사용법 (0) | 2022.11.03 |
Comments