@chevre/domain
Version:
Chevre Domain Library for Node.js
52 lines (35 loc) • 2.26 kB
Markdown
# Chevre Domain Library for Node.js
[](https://www.npmjs.com/package/@chevre/domain)
[](https://circleci.com/gh/chevre-jp/domain)
[](https://coveralls.io/github/chevre-jp/domain?branch=master)
[](https://david-dm.org/chevre-jp/domain)
[](https://snyk.io/test/github/chevre-jp/domain?targetFile=package.json)
[](https://nodei.co/npm/@chevre/domain/)
元祖興行パッケージオンラインチケットシステムのドメインモデルをnode.jsで使いやすいようにまとめたパッケージです。
## Table of contents
* [Usage](#usage)
* [Code Samples](#code-samples)
* [License](#license)
## Usage
```shell
npm install --save @chevre/domain
```
```Javascript
const chevre = require("@chevre/chevredomain");
```
前提として、mongooseでdefault connectionを確保することと、redis情報をセットすることが必要。
* mongoose default connection
```Javascript
chevre.mongoose.connect();
```
### Environment variables
| Name | Required | Value | Purpose |
|------------------------------------------|----------|-----------------|-----------------------------|
| `DEBUG` | false | chevre-domain:* | Debug |
| `CHEVRE_PERFORMANCE_STATUSES_REDIS_PORT` | true | | パフォーマンス空席状況保管RedisCache接続情報 |
| `CHEVRE_PERFORMANCE_STATUSES_REDIS_HOST` | true | | パフォーマンス空席状況保管RedisCache接続情報 |
| `CHEVRE_PERFORMANCE_STATUSES_REDIS_KEY` | true | | パフォーマンス空席状況保管RedisCache接続情報 |
## Code Samples
Code sample are [here](https://github.com/chevre-jp/domain/tree/master/example).
## License
ISC