An open API service indexing awesome lists of open source software.

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!

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 - 김진황