lemoncloud-engine-js
Common LEMON Engine Module by lemoncloud.
Usage
$ npm install lemoncloud-engine-js --save
$ npm update lemoncloud-engine-js --save
사용법.
코드에서 사용 방법.
const $scope = 0 ? global : {
name : 'LEMON-MESSAGES'
,env : process.env
}
const handler = require('lemoncloud-engine-js')($scope);
const _$ = handler._$;
const user = handler.user;
const group = handler.group;
const chat = handler.chat;
const FIELDS = [
'id', 'type', 'parent', 'name', 'message'
];
const ES_FIELDS = FIELDS;
const $LEM = _$.LEM(_$, '_'+name, {
ID_TYPE : 'LemonMessagesSeq',
ID_NEXT : 1000,
FIELDS : FIELDS,
DYNA_TABLE : 'Messages',
REDIS_PKEY : 'CMMS',
ES_INDEX : 'messages-v1',
ES_TYPE : 'messages',
ES_FIELDS : ES_FIELDS,
NS_NAME : name,
ES_MASTER : 1,
CLONEABLE : true,
PARENT_IMUT : false,
});
if (!$LEM) throw new Error(NS+'$LEM is required!');
환경변수(env)
$scope.env
에는 아래와 같이 backbone 의 엔드포인트 주소가 필요. (자세한 내용은 lemoncloud-backbone-js참고)
MS_ENDPOINT: 'http://localhost:8081/mysql'
DS_ENDPOINT: 'http://localhost:8081/dynamo'
ES_ENDPOINT: 'http://localhost:8081/elastic'
RS_ENDPOINT: 'http://localhost:8081/redis'
SS_ENDPOINT: 'http://localhost:8081/sqs'
WS_ENDPOINT: 'http://localhost:8081/web'
VERSION INFO
Version | Description |
---|
0.2.5 | web-proxy as 'WS' |
0.2.4 | record event handler |
0.2.3 | sqs-proxy as 'SS' |
0.2.0 | support scope during initialize |