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,
ES_VERSION : 6,
CLONEABLE : true,
PARENT_IMUT : false,
XECURE_KEY : 'lemon',
});
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'
SN_ENDPOINT: 'http://localhost:8081/sns'
WS_ENDPOINT: 'http://localhost:8081/web'
VERSION INFO
Version | Description |
---|
1.0.12 | bug: _current_time error in records |
1.0.11 | bug: save when 404 NOT FOUND |
1.0.10 | improve validate_properties. |
1.0.9 | ES_TIMESERIES - onRecords, do not update cache if timeseries. |
1.0.8 | ES_TIMESERIES to support Time-Series Data (ex: item-trace) |
1.0.6 | hot-fix of iota. |
1.0.5 | use elasticsearch as 1st cache. see REDIS_PKEY = '#' . |
1.0.4 | optimized 'do_readX' for xecured property. |
1.0.3 | add 'do_post_execute_notify' |
1.0.2 | do_saveES() direct save into ES. |
1.0.1 | updated package dependencies |
1.0.0 | support in-memory cache for node transaction. |
0.3.25 | s3-proxy support tags for S3 Tagging. |
0.3.24 | add s3-proxy as S3 . @180913. |
0.3.23 | cognito: do_get_confirm_user() . @180911. |
0.3.22 | support xecured fields see XECURE_KEY . @180801. |
0.3.21 | add 'do_post_execute_protocol' |
0.3.20 | try to parse body for http-proxy . |
0.3.19 | get stringified param and body for protocol-proxy . |
0.3.18 | add protocol-proxy . |
0.3.17 | optimize http-proxy . |
0.3.16 | optimize log msg. |
0.3.15 | add ses-proxy as SE . |
0.3.14 | add sqs stat as $SS.do_statistics() . |
0.3.13 | lambda-proxy as 'LS'. set LS_ENDPOINT . |
0.3.12 | optimize 404 error message. |
0.3.11 | allow ipp to be set 0. |
0.3.10 | sns-proxy as 'SN' |
0.3.9 | support ES6 with ES_VERSION = 6 . |
0.3.8 | minor fix for log of redis:my_save_node |
0.3.7 | mysql id-generator configuration (see $LEM.do_next_id() ). |
0.3.6 | fix ElasticSearch create index error due to 'string'. |
0.3.5 | support as _$.httpProxy(_$, name, uri) . |
0.3.4 | fix require error. |
0.3.3 | add httpProxy service. (use _$.createHttpProxy(name, endpoint) ) |
0.3.2 | cognito service - manager user/group. |
0.3.1 | remove MMS,user,group service. and add cognito service. |
0.2.13 | cognito-proxy as 'CS' |
0.2.12 | try to create node in dynamo if error of "an attribute that does not exist in the item" |
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 |