https://github.com/slicequeue/nodejs-express-mongodb-boilerplate
slicequque's nodejs express boilerplate!
https://github.com/slicequeue/nodejs-express-mongodb-boilerplate
boilerplate-nodejs bolierplate express nodejs
Last synced: 2 months ago
JSON representation
slicequque's nodejs express boilerplate!
- Host: GitHub
- URL: https://github.com/slicequeue/nodejs-express-mongodb-boilerplate
- Owner: slicequeue
- Created: 2023-01-21T07:26:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-30T13:33:53.000Z (almost 3 years ago)
- Last Synced: 2025-02-10T04:29:45.336Z (over 1 year ago)
- Topics: boilerplate-nodejs, bolierplate, express, nodejs
- Language: JavaScript
- Homepage:
- Size: 69.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Description
nodejs express + mongodb 이용한 보일러 플레이트
## Installation
```bash
$ npm install
```
## Running the app
환경 설정 파일을 build 한 경로 내부에 설정해야함
`/config` 경로에 아래 파일을 생성한다.
..env
설정 내용은 다음과 같다.
```dotnetcli
HOST=<호스트주소>
PORT=<서버포트>
DB_ID=<데이터베이스계정아이디>
DB_PW=<데이터베이스계정비밀번호>
DB_DATABASE=<데이터베이스명>
DB_POOLSIZE=<데이터베이스풀사이즈>
```
- 위 설정을 사용은 config 이용하여 처리함
- 서버 호스트 주소 및 포트 기본 정보 설정
- DB mongodb 접속 설정
## 실행법
```bash
$ npm start
```
- 환경 설정 파일 방식에 따라 NODE_ENV 환경 변수값을 설정해야함
## docker - 작업중
```bash
# docker build
$ docker build -t .
# docker run
$ docker run
```
## Test
```bash
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
```
## Stay in touch
- Author - 김진황